Hello All,

I am developing attendence mangement system, its my first application
in PHP, I want to compaire the input text box value with table records
the follwing is the code

  <form name = 'loginfrm' method = post action = "index.php" >  

  <pre>         </td>



    <td width="100%" height="115"><html>


<div style="mso-border-alt: solid #AAAAFF .75pt; width: 675; height:
234; border: 1.0pt solid #AAAAFF; padding: 6.0pt; background:

  <table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="100%"


      <td width="25%"><font size="4">User Name:</font></td>

      <td width="25%">


      <p><input name = "uname" type = "text" size="20"></p>


      <td width="25%"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp; Class:</font></td>

      <td width="25%"> <select name= "class">

                                         <option value = "BBA"> BBA</option>

                                         <option value = "BBA-IT"> 

                                         <option value = "BCS"> BCS</option>

                                         <option value = "B.Sc"> B.Sc</option>

                                         <option value = "MBA"> MBA</option>

                                         <option value = "MBA-IT"> 

                                         <option value = "MS-IT"> MS-IT</option>

                                         <option value = "MS-CS"> MS-CS</option>

                                         <option value = "Admin"> Admin</option>

                                        </select> </td>


      <td width="25%"><font size="4">Password:</font></td>

      <td width="25%"><input name ="passwd" type = "password" size="20"> </td>

etc. etc. .......



$db= mysql_connect("localhost","root","masood");

         $result= mysql_query("select uname,upasswd from user",$db);
        while ($myrow = mysql_fetch_array($result))
         if(($uname == $myrow["uname"]) && ($upasswd == $myrow["uname"]));
                        echo $myrow["uname"];
                        echo $myrow["upasswd"];

this give me error no 13, with uname,upasswd undefined, please help me out,

Nayyar Ahmad

Faculty Of Computer Science,
Institute Of Management Sciences,
Hayat Abad Peshawar , Pakistan.
Office : 92-091-9217404 , 9217452
Cell     :  92-0333-9139461

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to