Forum Moderators: coopster
what is on line 7 and 11?
is it something like $username = 'somename'; and then the same for colour?
if so you can define them above where they are first used, something like
$username = '';
$colour = '';
that could be the answer but I am not totally sure with out seeing what is on those lines.
<img src="food.jpg" width="430" height="100">
<?
if( $username!=null)
{ echo ("Thanks for your selection $username<hr>"); }
if( ($colour!=null) && ($dish!=null) )
{
$msg="You really enjoy $dish<br>";
$msg.="- especially with a nice $colour wine";
echo($msg);
}
?>
</body></html>
hiya. please this is what i did and i got those undefined variables.. please help as its driving me mad
$variable = array("username","password");
for ($i = 0; $i <= 1; $i++)
{
if( isset($HTTP_GET_VARS[$variable[$i]]) ¦¦ isset($HTTP_POST_VARS[$variable[$i]]) )
{
$variable[$i] = ( isset($HTTP_POST_VARS[$variable[$i]]) )? $HTTP_POST_VARS[$variable[$i]] : $HTTP_GET_VARS[$variable[$i]];
}
else
{
$variable[$i] = '';
}
}
if (!empty($data))
{
setcookie("reg_id", "$data[0]");
setcookie("reg_username", "$data[1]");
mysql_close();
header("Location: index.php");
}
else
{
header("Location: index.php");
}
hope its help you