We help IT Professionals succeed at work.

passing variable to a script

markmchugh
markmchugh asked
on
Hi,
I'm trying to pass a variable from one script to another one, this is the code in the first script

href=\"jobdetails.php?id=$jobid\">


in the jobdetails page, i do the following

$id = $_POST["id"];

but, when i echo $id its blank, what am i doing wrong? is there a better way?


thanks
Comment
Watch Question

Commented:
this
$id = $_POST["id"];
needs to be this
$id = $_GET["id"];

Commented:
you are getting the value from the url
it was not posted to the server from a form.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.