Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    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 :




    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.
    Warm Regards,
    Mivec

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Well, are you actually posting the form data?
    Omnis mico antequam dominus Spookster!

  • #3
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ...)
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •