now it's a structure problem - *sighs*
Posted: Thu Mar 06, 2003 12:19 pm
Hi - me again, with another very basic problem (honestly, i've got two books about php and they're not much help
).
This time it's about structuring a password check - this is how it goes:
- the administrator inserts a login and password into the mysql table
- the index page checks for a cookie called 'user' (with a header redirect if it's true) and doesn't find it, so it displays the login form.
- the user puts in the login and password & clicks send
- the check password page does a mysql query to compare the login and password, and .....
.... then what ?
I think my problem is that i've done too much Flash actionScript (sorry if i've offended anyone, lol!) and keep expecting to use a php equivalent of getURL to send the user on to the right page.
As far as i can see, if i use a mysql query to check the password i can't then use a header (location : page) to send the user on to the next page. I had thought of making the php write some <META REFRESH> tags in the html, but that seems like a crap way out when there must surely be a more elegant way of doing it with php.
can anyone help me with this - sorry to be a php oaf !

This time it's about structuring a password check - this is how it goes:
- the administrator inserts a login and password into the mysql table
- the index page checks for a cookie called 'user' (with a header redirect if it's true) and doesn't find it, so it displays the login form.
- the user puts in the login and password & clicks send
- the check password page does a mysql query to compare the login and password, and .....
.... then what ?
I think my problem is that i've done too much Flash actionScript (sorry if i've offended anyone, lol!) and keep expecting to use a php equivalent of getURL to send the user on to the right page.
As far as i can see, if i use a mysql query to check the password i can't then use a header (location : page) to send the user on to the next page. I had thought of making the php write some <META REFRESH> tags in the html, but that seems like a crap way out when there must surely be a more elegant way of doing it with php.
can anyone help me with this - sorry to be a php oaf !