lets say, i want to create a log in query:
$query ="SELECT * FROM userstable WHERE uName='".$userName."' AND pass='".$password."' ";
$result = mysql_query($query);
$num = mysql_numrows($result);
if ($num == 0) {
echo "wrong detiales";
}
else
{
echo "in";
but this way, the clients get to reach and put his data inside my query... I don't like it... why give the client access to fetch data from my db?
question: will it be healthy to put my data in an array, and then search the array instead of searching the query? it will probably be a tad slower (let's say i don't have many records). even if it's a tad slower, will it be more secure?
and suggestions? code examples?
10x, (by the way, I love this site so much!)