Posted: Fri Aug 01, 2003 3:03 pm Post subject: making a link change the value of a variable...
as u can see i've got my sign up system working... now u see that when u move yer mouse over "Rune Name" or "Rank" the color changes that means that there's gonna be a link there... now what i want to know is how to relate a link into php meaning that when i click on one of those a specific variable changes value... How do u do that...?!!?!
"I know how to do that using forms..."
Posted: Fri Aug 01, 2003 4:17 pm Post subject: (No subject)
you mean set a value to a variable froma URL?
like $PHP_SELF?runename=$value for run name&rank=$value for rank
so you can put that in the OnCLICK or ahref= or whe/
Posted: Fri Aug 01, 2003 4:36 pm Post subject: (No subject)
just use "get" variables which are the ones that go into the url.. just put a ? after the file (or url or whatever) and then the variable=something and if there are more than one variables use & in between them
then in that somepage.php file you can access those variables using $_GET['variable1'] and $_GET['variable2']
or (for older versions of php...)
$HTTP_GET_VARS['variable1'] and $HTTP_GET_VARS['variable2']
Posted: Fri Aug 01, 2003 6:52 pm Post subject: (No subject)
then inside my blah.php i use this code like this ?? :
is that right?
Posted: Fri Aug 01, 2003 7:00 pm Post subject: (No subject)
yes, thats right but the _GET[name]; has to be $_GET['name'];
You need the '' or you could use ""
and there has to be a $ before the _GET
same with the rank
Posted: Fri Aug 01, 2003 7:10 pm Post subject: (No subject)
One More thing... using OnCLICK what was the command to redirect?
Posted: Fri Aug 01, 2003 7:17 pm Post subject: (No subject)
No, since you have a table that uses 'OnMouseOver' or w/e,
You could use OnClick (same place you use the OnMouseover or w/e)...so whne the viewer clicks the table, it will go to thURL given in the onClick