pspfreak101 Posted October 21, 2008 Share Posted October 21, 2008 I can't figure out why its not displaying should be grabbing from row of the id number and displaying it or do I need to add something else to it? <?php //**************************************** //AppWarez 2008// //**************************************** require('connection.php'); require('header.php'); $id = $_GET['id']; ?> <div id="Main"> <? //delete entrie if ($_GET['id']) { if ($row["admin"] == "1") { $query = "SELECT * FROM downloads " . "WHERE ID=$id"; $app = $row["app"]; $uploadby = $row["uploadby"]; $decrip = $row["descrip"]; $result = mysql_query($query); if(!$result) { echo "Your query failed. " . mysql_error(); } else { echo("<P>Title: $app<br>" . "Uploaded By: $uploadby<br>" . "Descrip: $descrip<br>" . "<A HREF='entriedelete.php?id=$id'>" . "Delete</A> " . " <A HREF='entrieapprove.php?id=$id'>" . " Approve </A></P>"); } } } ?> <br /> <p><a href=index.php?action=admin> Click here to return</a></p> </div> </div> </div> Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/ Share on other sites More sharing options...
trq Posted October 21, 2008 Share Posted October 21, 2008 Where is $row defined? Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671276 Share on other sites More sharing options...
pspfreak101 Posted October 21, 2008 Author Share Posted October 21, 2008 header.php Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671277 Share on other sites More sharing options...
trq Posted October 21, 2008 Share Posted October 21, 2008 Sorry but your code / question makes little sense. You build a query, execute it, then never use any results it may produce. Maybe thats your problem? Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671280 Share on other sites More sharing options...
pspfreak101 Posted October 21, 2008 Author Share Posted October 21, 2008 Sorry if I didn't explain well but I switched it from to to $result and still gives me Title: Uploaded By: Descrip: Delete Approve Click here to return emtpy.... so its not the blank query, would it change from a row to a column using the WHERE ID? Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671298 Share on other sites More sharing options...
trq Posted October 21, 2008 Share Posted October 21, 2008 You never use the query your refering to. You execute it, but then never use $result. You need to pass $result to mysql_fetch_assoc then use the array that produces to get your output (I think). Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671301 Share on other sites More sharing options...
pspfreak101 Posted October 21, 2008 Author Share Posted October 21, 2008 Thanks now I see what you mean Link to comment https://forums.phpfreaks.com/topic/129483-solved-problem-not-displaying-from-databse/#findComment-671304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.