View Single Post
  #1 (permalink)  
Old 03-31-04, 02:39 AM
mivec mivec is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy what is wrong with this?

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

Quote:
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:

PHP Code:

<?
              
echo("<tr>"); 
                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 
                    password?</font>
                </td>"
);
        
              echo(
"</tr>");
       
?>
and this is where it should go :

PHP Code:

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.
Reply With Quote