Jump to content

Recommended Posts

Hi All,

 

I'm relatively new to PHP and new to these forums. I am having trouble with a relatively simple task. I have a form split over multiple pages and I am trying to pass the id value between these pages in the URL.

 

Currently the page looks like this: http://localhost:8888/OrganiseIDPLAN.php?id=AAO

 

I have created a link to another page that looks like this: <a href="OrganiseIDASX.php?id=">

 

I do not know what to make the id = to pick up the hidden field in which id is stored. I have tried everything I can think of. The data is not sensative though I was wondering if it may be easier to use sessions or cookies to do this.

 

Thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/53151-solved-passing-id-through-url/
Share on other sites

search the forum for $_GET, as this topic has be coved lots of times one of which was less than a day ago!

<a href="OrganiseIDASX.php?id=<?php echo $_GET['id'] ?>">

 

If you have a form with method='GET' all the values from the elements are processed via the URL

 

ie ?id=1&name=madtechie

 

to grab this info use

 

$_GET['id']; //for the ID (1)

$_GET['name']; //for the name (madtechie)

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.