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. Quote 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 (edited) You are missing the query function. $result = mysql_query("SELECT * FROM applications WHERE id ='" . mysql_real_escape_string($app) . "'"); Edited January 24, 2013 by neil.johnson Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/273589-wont-display-link/#findComment-1407972 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.