yash87 Posted October 13, 2010 Share Posted October 13, 2010 Hi, im trying to pass the information of a specific data to be edited in another form which is edit_doc.php. However, when i click "Edit" it doesnt seem to work. Only edit_doc.php opens but the information the does not appear. Is ther any mistake in the codes? while ($rows = mysql_fetch_assoc($run)) { echo"<tr>"; echo "<td>". $rows['file_ref'] ."</td>"; echo "<td>". $rows['file_name'] ."</td>"; echo "<td>". $rows['owner'] ."</td>"; echo "<td>". $rows['url'] ."</td>"; echo "<td><a href=edit_doc.php?id=$rows>" . "Edit" . "</a></td>"; echo "<td><a href=delete.php?id=$rows>" . "Delete" . "</a></td>"; echo "</tr>"; } echo "</table>"; } Thankz Quote Link to comment Share on other sites More sharing options...
rwwd Posted October 13, 2010 Share Posted October 13, 2010 What does the page source show when you execute this code? And are you sure that the query from the DB yields the results that you expect.. Rw Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 13, 2010 Share Posted October 13, 2010 You're assigning the entire $rows array to the links. They should look more like this, where 'pk_id' is the index field from the table. echo "<td><a href=edit_doc.php?id=$rows['pk_id']>" . "Edit" . "</a></td>"; echo "<td><a href=delete.php?id=$rows['pk_id']>" . "Delete" . "</a></td>"; 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.