Jump to content

Recommended Posts

Hi, i currently have a members area on a website which selects invoice info from the database if the invoice is for that member, however at the minute i have it so it only displays invoice id product etc and i want to allow the user to click more details and then it will retrieve the whole invoice.

 

at the minute I' am using a select statement to retrieve the details however i need to get the the reference from the results and store it in a variable so that i can send it to another page through url.

 

sorry if i have been confusing

 

thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/239873-storing-variable-in-url/
Share on other sites

yeah sorry for been confusing, what i am trying to do is when the select statement retrieves the data i want to keep a reference number so i can use it else where, but this reference is not stored in the members stable but the invoices table so i cannot put it in a session can i?

 

 

I am quite stuck lol

This isn't really what I'd qualify as session data. You just need to, as you said yourself, pass the invoice ID through the URL. Obviously you need to perform the necessary security checks, but it should just be as simple as that. What are you struggling with exactly?

This is what i have

 

$id =   "lsp03";


echo "<a href=\"view-invoice-details.php?id=" .$id. " \">View invoice Details</a>";

 

if the $id variable is set to a specific id and then i on the details page i say $_GET the id from the url it works and brings back the invoice based on the id lsp03.

 

however i don't know how to change it so it bring back the data if any id is selected.

[RESOLVED]

 

I just inserted the invoice reference id that has already been retrieved  in to the variable which is used in the url and it now brings back and displays the invoice basedo n the invoice selected.

 

$id =  $row['invoice_reference'];

 

thanks for the help appreciate it

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.