sngumo Posted May 24, 2008 Share Posted May 24, 2008 I am currently making my first PHP site and it is template based (i.e. all files run on the index.php file) and I have this problem please assist me on it: 1. One of the pages creates a list of articles with a "View details" link at the end of each list item, so that the user can click on this link if he wants to see the list item's details in full view. The HTML code for the link is as follows <a href='?section=showtransaction?id=1'> View Details </a> The PHP code I am using is: echo "<td>[<a href=?section=showtransaction?id=".$s_transaction['transactionid]."'"."> View Details </a>]</td>"; The Problem is I am using the $_GET method on the showtransaction.php file to get the id value (in this case 1) to use it to run a query which will extract all the row details for that specific id, but when I run it nothing is displayed even though I know that there are values within the database. What am I doing wrong? Please provide me with any code which might assist me here. Thanks Link to comment https://forums.phpfreaks.com/topic/107060-solved-how-to-structure-my-template-based-site/ Share on other sites More sharing options...
Groogy Posted May 24, 2008 Share Posted May 24, 2008 I can't see the query but I'll try to help out But I'd suggest (If your using mysql) to write "echo mysql_error();" after your query to check if there's something wrong in the query. plus the "?section=showtransaction?id=1" might confuse it. (Don't know, never tried myself) Use print_r($_GET) to see how the $_GET array is built up after calling that page. Link to comment https://forums.phpfreaks.com/topic/107060-solved-how-to-structure-my-template-based-site/#findComment-548837 Share on other sites More sharing options...
AndyB Posted May 24, 2008 Share Posted May 24, 2008 ? identifies a query string. & is used as the variable separator .... thus <a href="?this=3&that=4&something_else=wombat ... Link to comment https://forums.phpfreaks.com/topic/107060-solved-how-to-structure-my-template-based-site/#findComment-548838 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.