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> Quote Link to comment Share on other sites More sharing options...
trq Posted October 21, 2008 Share Posted October 21, 2008 Where is $row defined? Quote Link to comment Share on other sites More sharing options...
pspfreak101 Posted October 21, 2008 Author Share Posted October 21, 2008 header.php Quote Link to comment 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? Quote Link to comment 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? Quote Link to comment 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). Quote Link to comment 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 Quote Link to comment 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.