Current location: Hot Scripts Forums » Programming Languages » PHP » what is wrong with this?


what is wrong with this?

Reply
  #1 (permalink)  
Old 03-31-04, 03: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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-31-04, 06:06 AM
martin martin is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Can you show the code for the text boxes on page one. You are sending the form data as POST and not GET.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-31-04, 08:53 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
notices are not real errors !
you could just ignore them or use
PHP Code:

error_reporting(E_ALL E_NOTICE); 

in all your pages to make PHP ignore them ..

I think this notice is appearing when the form isn't sent yet..

no worries
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what's wrong in this statment? freak Perl 1 02-03-04 08:45 AM
Anybody know whats wrong NerdRUS PHP 3 01-02-04 12:11 AM
What have I done wrong now??? DAL Perl 4 11-24-03 07:26 PM
help me determine whats wrong Cmrdrv The Lounge 6 08-12-03 12:57 PM
something wrong with this code superman PHP 3 07-06-03 11:55 PM


All times are GMT -5. The time now is 06:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.