winmastergames Posted February 4, 2008 Share Posted February 4, 2008 Well sorry to say but i need a bit more help a deleted the idea of my last script and made a new one i just need 1 thing fixed in it though it comes up with this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\swd\ser1\fetch\index.php on line 24 Here is my Code: <html> <head> </head> Your Website ID is: <?php //show website ID, website copyright winmastergames 2008 echo $_GET["website"]; ?> <br> <?php //Show Website, website copyright winmastergames 2008 // connect to db // select db $db_host = "localhost"; $db_username = "root"; $db_password = "com12345"; $db_name = "swd"; $websiteid = $_GET["website"]; $conn = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error()); mysql_select_db($db_name, $conn) or die(mysql_error()); $myquery = mysql_query("select * from ($websiteid)"); while($r=mysql_fetch_array($myquery)) { $rowname=$r["name"]; // put your field's name is where "their_website" is $rowurl=$r["url"]; // put your field's name is where "their_link" is $rowdescription=$r["description"]; // put your field's name is where "their_description" is echo "$rowname | "; echo "<a href=\"$rowurl\">$rowurl</a> | "; echo "$rowdescription<br>"; } ?> </html> I just cant figure it out?? Please help Quote Link to comment https://forums.phpfreaks.com/topic/89426-help-with-my-phpmysql-script/ Share on other sites More sharing options...
revraz Posted February 4, 2008 Share Posted February 4, 2008 $myquery = mysql_query("select * from ($websiteid)") or die (mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/89426-help-with-my-phpmysql-script/#findComment-457929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.