Forum Moderators: coopster
This may be simple to all of you but not for me.
I need to use PHP href to:
1. go to a webpage (webpage.php)
2. parse some variables (variable1 and variable2) with that link.
Is the following use correctly?
<a href='webpage.php?variable1=value1;variable2=value2'>Link To</a>
Can the variables (variable1 and variable2) pass to webpage.php by the above link?
Best regards
Alex
and welcome to Webmasterworld.
Yes, the HTTP GET method may be used to pass data to a page.
<a href="webpage.php?variable1=value1&variable2=value2">Link To</a>
Note the '&' as separator between the variables.
The remote target server will get the data and you can use them like this:
<?php
$data1 = $_GET['variable1'];
$data2 = $_GET['variable2'];
?>
Regards,
R.