Jump to content


This topic is now archived and is closed to further replies.


clickable links in a table & pulling info for logged in user only

Recommended Posts

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

Share this post

Link to post
Share on other sites
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...

echo '<a href="podisplay.php?po=' . $row['ponumber'] . '>' . $row['ponumber'] . '</a>"';

I guessed at field names, but I hope you get the idea...

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.