is it possible to add multiple options for doing searches.

Such as
Code:
$myval1 = $_POST['fname'];
$myval2 = $_POST['lname'];
$myval3 = $_POST['phoneNo'];
$myval4 = $_POST['email'];

SELECT * 
FROM registree
WHERE fname=$myval1 or lname=$myval2 or phoneNo=$myval3 or       email=$myval4;


where im posting the variables from a form, like a search box? like if i want to search all people with the first name ithkrul
or want to search all people with the last name katir. My concern is, can I use 'or' like this? and what are the annomalies possibly faced when searching like this?

or should i only concern myself with doing searches via primary key.

Also new question concerning secure logins.

ok so i have a log in via php, but if i just copy and paste the to the url it takes me to what should be password only? basically

http://ccis004.uncc.edu/~chaconia/admin.php

and

http://ccis004.uncc.edu/~chaconia/admin.php?password-blahblah&username=blahblah

take me to the same "admin" page regardless


Last edited by Ithkrul; 06/25/09 06:17 PM.