Jump to content

list pulling up blank


katarra

Recommended Posts

For some reason, when I run this script, the wep_list is pulling up blank when I know there are items in there.

 

Can someone take a look at it and see what I might be doing wrong?

 

Thanks!

 

$inputs = '<input type="hidden" name="name" value="'.$_POST['name'].'">';

        $inputs .= '<input type="hidden" name="barter" value="'.$_POST['barter'].'">';

        $inputs .= '<input type="hidden" name="heal" value="'.$_POST['heal'].'">';

        $inputs .= '<input type="hidden" name="heal" value="'.$_POST['move_around'].'">';

   

$result = $db->execute("select * from `items` where `type`='weapon'") or die("query failed: ".mysql_error());

 

$wep_list = '';

 

        while($row = $result->fetchrow());

        {

      $wep_list .= "<tr><td>$row[name]</td><td>$row[price]</td><td><input type=checkbox name=wep_$row[id]></td></tr>";

      }

 

        // display a successful message

        $page = makepage('npc_weapons', '', 0);

        $page = str_replace('{wep_list}', $wep_list, $page);

        $page = str_replace('{inputs}', $inputs, $page);

 

        echo $page;

[\php]

 

Link to comment
https://forums.phpfreaks.com/topic/195744-list-pulling-up-blank/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.