Announcement

Collapse
No announcement yet.

Hyperlink to a record based on the master record's ID

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hyperlink to a record based on the master record's ID

    Hello,

    Here I have this website which is keeping contracts and invoices on a MySQL database.
    Now, I have a page where the contracts are listed and another one where invoices are listed.

    When I'm adding a new invoice I have a dropdown where client_name, contract_number and contract_date are concatenated so I can select the corresponding contract to add the invoice to.

    My issue is:
    on the contracts list page, I added a link to each contract, "View invoice" which is suppose to display the corresponding invoice.
    Can somebody help by telling me how should I format the hyperlink so the correct invoice opens?
    Right now I tried with "http://whatever.com/invoice_view.php?id=client" - where client is the name of the field from invoice where those three values above are concatenated - but it returns a view table without any values on it.

    Thanks a lot!

    Cheers!

    Sieg

  • #2
    Re: Hyperlink to a record based on the master record's ID

    Depends on how the script looks for the client. If, f.e. your "invoice_view" pages searches the invoices based on the client ID, and your client id is represented in the php script as $client_id , your link should be http://whatever.com/invoice_view.php?id=$client_id . Have a look at www.navaldesign.info/therapy2/search.php Click on "Search Now" whithout selecting anything from the dropdowns (so that all results are displayed) then click on view. I beleive that is excactly what you are after. of course, much depends on your DB structure, which i don't know.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    Working...
    X