cdog5000 Posted June 24, 2008 Share Posted June 24, 2008 <?php mysql_connect('lalala', 'lalalala', 'lalala') or die(mysql_error()); mysql_select_db('lalalalal') or die(mysql_error()); $selected_radio = $_GET['name']; if ($selected_radio == 'RSBot') { $Botid = 0; } else if ($selected_radio == 'Nexus') { $Botid = 1; } echo "<div align = center>you are viewing scripts from the bot " . $selected_radio . "</div><br/><br/>"; $skill = $_GET['skill']; $Botid = $_GET['bot']; $query = "SELECT * FROM ScriptDatabase WHERE botname = " . $selected_radio . " "; $information = mysql_query($query); while ($row == mysql_fetch_assoc($information)) { echo " <br/> Username: " . $row['username'] . " <t><t> Script ID:" . $row['id'] . " <br/> <br/> <div align = center> <b>Script Name:</b>" . $row['scriptname'] . " <div/> <br/> How to use:" . $row['tutorial'] . " <br/> Information:" . $row['information'] . " <br/> Script:" . $row['script'] . " <br/> <br/> >-------------------------------------------------------------------------------------<"; if ($row['username'] == null) { echo "No Scripts In Database"; } } ?> ok lol now it shows like 50,000 Username: Script ID: Script Name: How to use: Information: Script: >------------------------------------------------------------------------------------- Link to comment https://forums.phpfreaks.com/topic/111622-viewscriptsphp/ Share on other sites More sharing options...
peranha Posted June 24, 2008 Share Posted June 24, 2008 Try this for your query $query = "SELECT * FROM ScriptDatabase WHERE botname = '{$selected_radio}'"; and post the error you are getting if this doesnt work Link to comment https://forums.phpfreaks.com/topic/111622-viewscriptsphp/#findComment-572970 Share on other sites More sharing options...
phpSensei Posted June 24, 2008 Share Posted June 24, 2008 $row cant be exactly equalled to the db rows, because $row is being defined inside the while, you aren't comparing $row and mysql_fetch_assoc change while ($row == mysql_fetch_assoc($information)) { to while ($row = mysql_fetch_assoc($information)) { Put this at the bottom of your page to echo mysql_error(); Link to comment https://forums.phpfreaks.com/topic/111622-viewscriptsphp/#findComment-572980 Share on other sites More sharing options...
peranha Posted June 24, 2008 Share Posted June 24, 2008 Sorry, counted wrong, thought that the query row was line 19. Link to comment https://forums.phpfreaks.com/topic/111622-viewscriptsphp/#findComment-572981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.