adamjones Posted January 24, 2013 Share Posted January 24, 2013 Hi, I'm trying to display an iframe on my website, the source of which will depend on a link from the database. I'm using the GET method from the URL for the ID of the link, which is in the table; <? include('core/dbconn.php'); $app = $_GET['id']; $result="SELECT * FROM applications WHERE id ='$app'"; while ($row = mysql_fetch_array($result)) { echo $row ["link"]; } ?> I'm getting the following error; The requested URL /<br /><b>Warning</b>: mysql_fetch_array() expects parameter 1 to be resource, string given in <b>/home/suvoocge/public_html/application.php</b> on line <b>34</b><br /> was not found on this server. Link to comment https://forums.phpfreaks.com/topic/273589-wont-display-link/ Share on other sites More sharing options...
JonnoTheDev Posted January 24, 2013 Share Posted January 24, 2013 You are missing the query function. $result = mysql_query("SELECT * FROM applications WHERE id ='" . mysql_real_escape_string($app) . "'"); Link to comment https://forums.phpfreaks.com/topic/273589-wont-display-link/#findComment-1407970 Share on other sites More sharing options...
adamjones Posted January 24, 2013 Author Share Posted January 24, 2013 Whoops, thank you! Link to comment https://forums.phpfreaks.com/topic/273589-wont-display-link/#findComment-1407972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.