Jump to content

hidden value


crouchjay

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,
Link to comment
https://forums.phpfreaks.com/topic/10070-hidden-value/
Share on other sites

  • 2 weeks later...
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
Link to comment
https://forums.phpfreaks.com/topic/10070-hidden-value/#findComment-41420
Share on other sites

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.