Jump to content

I need help sending a variable value thru a link.


robert123

Recommended Posts

Hi, I am very new to php and just cannot figure this out.  I am trying to use a link to send a value to the next website page. 

 

For example I am using this code but it is not working right.  I assigned a keyword a number value and want to pass that value to the next page.  When use echo $id on the first page, it shows me the value so I know it worked, but I can't send the data to the next page.

 

href="h*ttp://www.website.com/page.php?ORDER=<? '.$id.' ?>"

 

$id has a number value that I want to read from the next page, but with this code on the destination page it will not show me the value it just is blank.

 

<?php

$id = trim($_GET['ORDER']);

echo $id;

?>

 

I hope you understand what I was trying to say.

 

Thanks,

Robert

Hi, I am very new to php and just cannot figure this out.  I am trying to use a link to send a value to the next website page. 

 

For example I am using this code but it is not working right.  I assigned a keyword a number value and want to pass that value to the next page.  When use echo $id on the first page, it shows me the value so I know it worked, but I can't send the data to the next page.

 

href="http://www.website.com/page.php?ORDER=<? '.$id.' ?>"

 

$id has a number value that I want to read from the next page, but with this code on the destination page it will not show me the value it just is blank.

 

<?php

$id = trim($_GET['ORDER']);

echo $id;

?>

 

I hope you understand what I was trying to say.

 

Thanks,

Robert

 

<a href="http://www.website.com/page.php?ORDER=<?php echo $id; ?>">

Archived

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

×
×
  • 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.