I would like to change a user verification script from php-mysql to php-xml .. I mean I want to store the data and read it from xml in stead of mysql.
To make my question more understandable :-
Lets say that I have a html file that has a form where users enter :
username, password, country, age, telephonenumber, email and will post those info to register.php where we will have the below code :-
(after some php codes to check the entry and make sure every field entered correctly):-
$query="insert into usertable (username, password, country, age, telephonenumber, email) values ('$username', '$password', '$country', '$age', '$telephonenumber', '$email')";
Now the first thing I want to do is to save those variables in an xml file ( lets call it datafile.xml )
The second part of the question is to make a php script to see if the user exists in datafile.xml
In the login form .. the user would enter username and password.
the verification script with mysql would be something like :-
$q="select * from usertable where username like '$username' and password like '$password'";
echo "login successfull";
echo "Invalid username or password";}
I want the script to be able to add as much as user we want from the registration form ( not to replace it every time with one user info ).
Thank you very much in advance.