I am just starting with mysql, and I was testing displaying table info. I now get an “Unexpected T_WHILE” error when I try it. Please look at the code and try to help me out! Thank you so much!
[php]
$messsage
"; endwhile; ?>
[/php]
I am just starting with mysql, and I was testing displaying table info. I now get an “Unexpected T_WHILE” error when I try it. Please look at the code and try to help me out! Thank you so much!
[php]
[/php]
hello metzfan33, Replace below code (remove below code) [php] WHILE($rows = mysql_fetch_array($query)): $name = $rows['name']; $email = $rows['email']; $message = $rows['message'];echo “$name
$messsage
”;
endwhile;
[/php]
use below code
[php]
while($rows = mysql_fetch_array($query))
{echo $rows[‘name’]."
". $rows[‘email’]."
". $rows[‘message’];
echo “
”;
}
[/php]
i hope this will helpful for you.
Reply your feedback
SR
Oh wow thank you so much! I really can’t thank you enough, I spent all last night trying to figure this out (pathetic, I know). I got that code structure from a tutorial website, I guess the variables are unneeded! I started to get real frustrated and gave up, but then I saw this e-mail, tried again, and it works flawlessly! THANK YOU!!
hello metzfan33, it's really nice to hear that your problem is resolve. Post other issues and query. have nice day.. :) :D
SR