Im stuck , I have a website which index’s gamer profiles and now keeps a historic record.
Everythings implemented and working only when you manualy write the url out.
Folowing the link made by the form wont work because its index.php?id= and i then want to add &date onto this but ?date= needs to be &date= from the form ontop of index.php?id=
Normal user input normalyresults in somthing like:
index.php?id=123456789
which returns the users profile no problem
On that page i have “load historic data” drop down which shows dates of this profile to load dependant on the id input.
<form method='get' action='index.php?id=$data' >
Folowing the submit button on the page returns:
index.php?id=123456789?date=112012
however , The only way i can get this to work is to manualy change that ? to a & between ID and DATE
For the life of me i cannot figure it out!
basicaly i need:
index.php?id=123456789 ? date=112012
to be
index.php?id=123456789 & date=112012
So that when the page reloads i can see both ID and DATE
I think i can be done via post however i need it visible in the url idealy
Ive also tried:
<form method='get' action='$_SERVER['PHP_SELF']'>
<form method='get' action='id_$data'> (with a mod rewrite)
GET
You can’t use the get method for sending to a url already containing a get param as you will get mixed results from different browsers. You need to add them to hidden fields like this which will then get added to the URL when the form is sent:
POST
If you need to set the form method to post, while containing get params in the url it needs to be done like this:
SECURITY
Do not do this:
Reason why not