Forum Moderators: coopster

Message Too Old, No Replies

Help using the POST method on PHP

         

Jakotsu

3:05 am on Dec 9, 2006 (gmt 0)

10+ Year Member



Hi,
I need to pass a value into a hidden form element by simply clicking on a link, and the value passed should be the visible name of the link itself. Can this be done without Javascript?

This php page will be accessed on mobile phones, and Javascript support on them is very limited, so I must deal with it using only PHP.

Thanks in advance!

mcavic

3:34 am on Dec 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Without Javascript, I believe the only way to generate POST data is with a form.

eelixduppy

6:38 am on Dec 9, 2006 (gmt 0)



Why not use GET variables?

Something like this:


<a href="page.php?link=test">Link</a>

Then on ipage.php, you have this:


<input type="hidden" value="<?php echo $_GET['link'];?>" />

That is if I'm understanding you correctly :)

Jakotsu

4:14 am on Dec 10, 2006 (gmt 0)

10+ Year Member



I believe that would work like a charm... thanks!