Passing a parameter to the server
Moderators: egami, macek, gesf
Getting the server variable script_name will only get the name of the page but not include the passed variables.
You need to get the variable passed and the script name and concantenate it as one string.
reyBorn Online Portal
http://reygcalantaol.com
You need to get the variable passed and the script name and concantenate it as one string.
reyBorn Online Portal
http://reygcalantaol.com
@reyborn - I don't understand why we need to pass the variable? When ever a user visits a page (say page1.html), the server needs to send an email to somebody saying that page1.html has been visited. I think, all we need here is the name of the page that has been visited - correct me if I am wrong.
One way to do this will be - when page1.html is visited, a hidden variable is set to the current page name and the form gets auto submitted to some server.php where $_POST['hiddenvariable'] will give the script name.
One way to do this will be - when page1.html is visited, a hidden variable is set to the current page name and the form gets auto submitted to some server.php where $_POST['hiddenvariable'] will give the script name.