Jump to content

Archived

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

crouchjay

hidden value

Recommended Posts

I have created a value and want to post it on the next page so:
[code]$value=$_POST['value'];
<input type="hidden" name="<?php echo $value; ?>" />
url...?value='.$value.'[/code]
but when I put the cursor over the link the value is shown blank, but I know there is a value there. Is this the correct sequence of steps if you want to save a value to use later?

Jay,

Share this post


Link to post
Share on other sites
I hope that isn't an exact copy of the code... I assume the last part is pseudo code.

But I guess I'm not sure why you're creating a hidden input if you're sticking it right into a URL.

Share this post


Link to post
Share on other sites
Hi there,

I can't really understand your code though i understand what you are trying to achieve.

The problem that i can spot in your code is in the line
[code]<input type="hidden" name="<?php echo $value; ?>" />[/code]
it should be
[code]<input type="hidden" name="value" value="<?php echo $value; ?>" />[/code]

If this does not solve your problem, please post the code of your link also (which i assume is the last line of your code)

HTH

Share this post


Link to post
Share on other sites

×

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.