View Full Version : what is wrong with this?

03-31-2004, 08:39 AM
hi all,

ok..i have a simple login page and i am getting this error :

Notice: Undefined index: txtUserID in c:\program files\apache group\apache\htdocs\ewedding\newweddone.php on line 7

Notice: Undefined index: txtPass in c:\program files\apache group\apache\htdocs\ewedding\newweddone.php on line 7

here is the code in my 1st page:

echo("<td background=\"img/loginbg.gif\" align=center>
<a href=\"newwedDone.php?style=signin\"><img src=\"img/enter_but.gif\" width=\"58\" height=\"18\"></a><br>
<font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Forgot


and this is where it should go :

switch ($_GET["style"])
case "signin":
$query = 'SELECT username, user_password FROM tblmembers WHERE username = \' ' . $_POST["txtUserID"] . '\' AND user_password = \' ' . md5($_POST["txtPass"]) . '\' ';
$rs = mysql_query($query);
$numRows = mysql_num_rows($rs);
if ($numRows > 0){




the textbox names are txtUserID and txtPass. can someone pls help me?i have been pondering this question for some time already and i dun see y it should be an error also...thanking u all in advance.

03-31-2004, 08:55 AM
Well, are you actually posting the form data?

03-31-2004, 10:56 AM
These are not errors buth notices, which you'll,probably get because you didn't initiate these two variables, but this will not have any effect on your scriptexecution

There have been two very recent threads here that explain ho to set your errorreporting so you get all errors except notices (search ...)