Author Topic: PHP code returns blank  (Read 1438 times)

0 Members and 1 Guest are viewing this topic.

Offline manmanmanTopic starter

  • Irregular
  • Posts: 23
  • if (brain = true) { kill('brain'); } //Kills brain
    • View Profile
Re: PHP code returns blank
« Reply #15 on: September 13, 2006, 11:55:35 PM »
I just realised something:

while($result mysql_fetch_array($result)) {
    
	
echo 
"<table border='1'>";
        echo 
"<tr>"
        echo 
"<th>Character Name:</th> <td>".$result['name'] . "</td></tr>"
        echo 
"<th>HP:</th> <td>".$result['mp'] . " </td></tr>"
        echo 
"<th>MP:</th> <td>" $result['mp'] . " </td></tr>"
        echo 
"<th>EXP:</th> <td>" $result['exp'] . " </td></tr>"
        echo 
"<th>SP:</th> <td>" $result['sp'] . " </td></tr>";
	
	
echo 
"</table>";  
    }


was my original code. I realised this: while($result mysql_fetch_array($result)) {

I changed it to: while($get_result mysql_fetch_array($result)) {

And now it works.