Jump to content

Get Method


jimfog

Recommended Posts

As i know the get method passes the data through the url. Besides using a form to send the data(with the GET method), is it possible that the data gets send through a href link that the users click on. Recently i came across such a thing and i wanted to know if actually is feasible? Thanks

Link to comment
Share on other sites

You can send the data using the <a> tag yes (and in general any other ways that link to pages will work). Example:

<a href="webpage.php?var1=value1&var2=value2">every day i am shufflin</a>

You can get the values using $_GET['varX'] like in forms.

Link to comment
Share on other sites

Thanks, Your answer confirms what i know.

Link to comment
Share on other sites

Note also that a POST form can also transmit $_GET data as well. Simply put $_GET data in your form's "action" attribute.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...