I have this following code in my php file:
$p_adminType = $_POST['adminType'];
$p_adminUserID = $_POST['userID'];
$p_adminUserPass = $_POST['userPass'];
$p_firstName = $_POST['adminFirstName'];
$p_lastName = $_POST['adminLastName'];
And then when I execute the file by clicking the submit button from an html file, I get a Notice Error saying:
Notice: Undefined index: userID in C:\wamp\www\CaNeCo\CaNeCo_Admin_Reg.php on line 19
Notice: Undefined index: userPass in C:\wamp\www\CaNeCo\CaNeCo_Admin_Reg.php on line 20
Notice: Undefined index: adminFirstName in C:\wamp\www\CaNeCo\CaNeCo_Admin_Reg.php on line 21
wherein you can see from the code where lines 19, 20, and 21 are. I tried adding isset() function to my code just like from what I have read from other sites/forums but when I do that, it doesn't solve my problem. It only hides the error message and the variables are still empty.
How can I resolve that problem? Also, I'm just wondering why is it only happening to 3 of the 5 declarations? $p_adminType = $_POST['adminType']; and $p_lastName = $_POST['adminLastName']; just work fine but not the other 3? Can someone please enlighten me about that?
This is the html file that I have:
<form method="post" action="CaNeCo_Admin_Reg.php">
  <table width="400">
  <tr>
      <td><b>Log-in Information:</b></td>
  </tr>
  <tr>
      <td> </td>
  </tr>
  <tr>
      <td>Administrator Type:</td>
      <td>
        <select name="adminType" id="adminType">
        <option value="0">Please Select</option>
        <option value="1">Super Administrator</option>
        <option value="2">Administrator</option>
        <option value="3">Secretary</option>
        <option value="4">Viewer</option>
        </select>
      </td>
  </tr>
  <tr>
      <td>User ID: </td>
      <td><input type="text" name:"userID" id="adminUserID" placeholder="User I.D." maxlength="20" size="35"/></td>
  </tr>
  <tr>
      <td>Password: </td>
      <td><input type="password" name:"userPass" id="adminUserPass" placeholder="Password" maxlength="25" size="35"/></td>
  </tr>
  <tr>
      <td>Repeat Password:</td>
      <td><input type="password" name="repeatPass" id="adminRepeatPass" placeholder="Repeat Password" maxlength="25" size="35"/></td>
  </tr>
  <tr>
      <td> </td>
   </tr>
   <tr>
      <td colspan="25"><b>Personal Information:</b></td>
   </tr>
   <tr>
      <td> </td>
   </tr>
   <tr>
      <td>First Name: </td>
      <td><input type="text" name:"adminFirstName" id="adminFirstName" placeholder="First Name" maxlength="20" size="35"/></td>
   </tr>
   <tr>
      <td>Last Name: </td>
      <td><input type="text" name="adminLastName" id="adminLastName" placeholder="Last Name" maxlength="25" size="35"/></td>
   </tr>
   <tr>
      <td> </td>
   </tr>
   <tr>
      <td colspan="50"><center><input type="submit" value="Submit"/></center></td>
   </tr>
</table>
 
     
     
     
     
    