annabug Posted March 25, 2006 Share Posted March 25, 2006 Hi all.I'm still learning all of this so please bear with me. I need ideas / suggestions / help on the following.I'm creating a database driven site where, once the client is logged in, he will be redirected to a user-specific page. On this page, I want to be able to call up just that current logged in user's orders / purchases. The orders will be displayed in a table with clickable links. When a user clicks on, say, the purchase order number, he will be taken to a page that displays the info for just that purchase.I have my database set up.I have my backend set up for non-admin entering of data for the table.What I'm looking for is:1) how to code it so it does a 'SELECT' of just the data for the user that's logged in. Was thinking something along this line but my syntax and such is wrong somewhere.$sql = 'SELECT * FROM 'orders' WHERE 'acct_name' = \'hills\' (hills = logged in user)2) Once the data is pulled in, I need to make the data clickable and redirect to the purchase-specific page. This one has me stumped.I'm on my way to the book store to pick up yet another book with hopes of finding solutions.Any and all help or direction toward help is more than appreciated.Thank you so much!-- Anna in WA Quote Link to comment https://forums.phpfreaks.com/topic/5796-clickable-links-in-a-table-pulling-info-for-logged-in-user-only/ Share on other sites More sharing options...
AV1611 Posted March 25, 2006 Share Posted March 25, 2006 Will this do it? You will have to make a page called podisplay.php that takes the specific PO Number and displays the data for it...While($row=mysql_fetch_array($result)){ echo '<a href="podisplay.php?po=' . $row['ponumber'] . '>' . $row['ponumber'] . '</a>"'; }I guessed at field names, but I hope you get the idea... Quote Link to comment https://forums.phpfreaks.com/topic/5796-clickable-links-in-a-table-pulling-info-for-logged-in-user-only/#findComment-20680 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.