Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you post from a hyperlink?

Status
Not open for further replies.

NigeB

Technical User
Nov 29, 2000
53
GB
I generate a table of information from a MySQL query and then I would like to select a field in a row of data, by clicking onit, it posts that hyperlink to a new page as post data, is this possible if so how?

TIA

NigeB
 
You can send data to a script from a URL in a link.

A link like:

<a href=&quot;/somescript.php?foo=3&quot;>here</a>

Will send the variable &quot;foo&quot; with a value of 3.

But you can't do it via POST-method. It can only be GET-method.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Many thanks, yes I had a complete blank, the whole thing works well using the GET method.

Regards

NigeB
 
or you can use <a href=&quot;/somescript.php?foo=3&quot;>here</a>
and get the var with request if you want to work with globals off foo=$_REQUEST['foo'] hope this helps too
 
sleipnir214 i didn't said that your answer was bad i just said if he want to use globals=off in php.ini $_REQUEST will be the solution. I just showed him another solution. Sorry if i upset you it wasn't my intention. Best regards Ionut Popa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top