Solved

Undefined Index

Posted on 2006-06-20
22
1,155 Views
Last Modified: 2008-03-03
Hello, I got a question about and undefined index.  I am trying to understand the error as this is the second time I have run across it while learning php from fixing this site.  The last time I just needed to add (!isset(before the $POST[])) althought that isn't working for the error this time.  So I really want to understand this error and how to fix / troubleshoot it.  Any help is greatly appreciated in advance.

line 14 - Undefined index:  UserName
line 14 begins with the if below
<?php
if($_POST['UserName']!="" && $_POST['Password1']!="" && $_POST['Password2']!="" && $_POST['Email']!="" && $_POST['Category'] !="" && $_POST['Name'] !="" && $_POST['Country'] !="" && $_POST['State'] !="" && $_POST['City'] !=""&& $_POST['ZipCode'] !="" && $_POST['Adress'] !=""  && $_POST['birth']!="" && $_POST['ss']!="" && $_POST['idnumber']!=""&& $_POST['phone']!="" && $_FILES['ImageFile']['tmp_name']!="" && $_FILES['ActImage']['tmp_name']!="" && $_FILES['RImage']['tmp_name']!=""){

      $errorMsg="";
      
      //real username
      $replacevalues = array('&','/'," ","?","+","%","$","#","@");
      $username=str_replace($replacevalues,"", $_POST['UserName']);
      
      //if username already exists
      $result = mysql_query("SELECT user FROM chatmodels WHERE user='$username'");
      if (mysql_num_rows($result)>=1){
            $errorMsg.="Username exists, please choose another one!<br>";
      }  else {
            //if dir still exists
            @rmdir("../../models/".$username."/");
            @mkdir("../../models/".$username."/");
                  
            //if password are correct
            if($_POST['Password1']!=$_POST['Password2']) {
                  $errorMsg.="Passwords do not match<br>";
            } else      if(strlen($_POST['Password1'])<6){
                  $errorMsg.="Passwords must be at least 6 characters long<br>";
            }

            //user ID
            $dateRegistered=time();
            $currentTime=date("YmdHis");
            $userId=md5("$currentTime".$_SERVER['REMOTE_ADDR']);

            //calculates some time
            $day=$_POST['day'];
            if ($day<10){$day="0".$day;}
            $currentSeconds=strtotime($day." ".$_POST['month']." ".$_POST['year']);

            //makes the users folder in models folder
            $urlThumbnail="../../models/".$_POST['UserName']."/thumbnail.jpg";
            $urlIdentityImage="../../models/".$_POST['UserName']."/".$userId.".jpg";
            $urlRImage="../../models/".$_POST['UserName']."/representative.jpg";

            //we copy the thumbail image
            if (!@copy($_FILES['ImageFile']['tmp_name'],$urlThumbnail)){
            $errorMsg.="Thumbnail image file could not be copied, please try again.<br>";
            }
            //we copy the id image
            if (!@copy($_FILES['ActImage']['tmp_name'],$urlIdentityImage)){
            $errorMsg.="ID image file could not be copied, please try again.<br>";
            }
            //we copy the R image
            if (!@copy($_FILES['RImage']['tmp_name'],$urlRImage)){
            $errorMsg.="Representative image file could not be copied, please try again.<br>";
            }
      }
            $db_pass=md5($_POST['Password1']);

            if ($errorMsg==""){
                  mysql_query("INSERT INTO `chatmodels` ( id , user , password , email , language1 , language2 ,language3,language4, birthDate , braSize , birthSign , weight , weightMeasure , height , heightMeasure , eyeColor , ethnicity , message , position , fantasies , hobby , hairColor , hairLength , pubicHair , tImage , cpm , epercentage ,minimum, category , name , country , state , city , zip , adress , actImage , pMethod , pInfo , dateRegistered , owner , lastLogIn , phone ,fax, idtype , idmonth , idyear , idnumber , birthplace , ssnumber , msn , yahoo , icq , broadcastplace, emailtype,  status , lastupdate) VALUES ('$userId','$_POST[UserName]' , '$db_pass', '$_POST[Email]', '$_POST[L1]', '$_POST[L2]', '$_POST[L3]', '$_POST[L4]', '$currentSeconds', '$_POST[BraSize]', '$_POST[BirthSign]', '$_POST[Weight]', '$_POST[weightMeasure]', '$_POST[Height]', '$_POST[heightMeasure]', '$_POST[eyeColor]', '$_POST[Ethnic]', '$_POST[Message]', '$_POST[Position]', '$_POST[Fantasies]', '$_POST[Hobbies]','$_POST[hairColor]','$_POST[hairLength]','$_POST[pubicHair]','Thumbnail Image', '295', '30','500','$_POST[Category]', '$_POST[Name]', '$_POST[Country]', '$_POST[State]','$_POST[City]', '$_POST[ZipCode]', '$_POST[Adress]', 'IdentityImage', '$_POST[PMethod]', '$_POST[PInfo]','$dateRegistered','$sopusername','$dateRegistered','$_POST[phone]','$_POST[fax]','$_POST[idtype]','$_POST[idmonth]','$_POST[idyear]','$_POST[idnumber]','$_POST[birth]','$_POST[ss]','$_POST[msn]','$_POST[yahoo]','$_POST[icq]','$_POST[location]','$_POST[emailtype]','pending','00')");
                  header ("Location: modelregistered.php");
            }
}
else
{
$errorMsg="Please fill all the required fields.";
}
?>
line 283 - Undefined index:  day
line 283 below begins with the if statement
<select name="day" id="day">
          <?
              for($i=01; $i<=31; $i++)
              {
              echo "<option value='$i'";
              if ($_POST['day']==$i){ echo "selected";}
              echo">$i</option>";
              }
              ?>
        </select>
line 289 - Undefined index:  month
line 290 - Undefined index:  month
line 291 - Undefined index:  month
line 292 - Undefined index:  month
line 293 - Undefined index:  month
line 294 - Undefined index:  month
line 295 - Undefined index:  month
line 296 - Undefined index:  month
line 297 - Undefined index:  month
line 289 starts again with the if statements below and follows consecutively.
     <select name="month" id="month">
            <option value="January" <? if ($_POST['month']=="January"){ echo "selected";} else if (!isset($_POST['month'])){ echo "selceted";}?>>January</option>
            <option value="February" <? if ($_POST['month']=="February"){ echo "selected";}?>>February</option>
            <option value="March" <? if ($_POST['month']=="March"){ echo "selected";}?>>June</option>
            <option value="July" <? if ($_POST['month']=="July"){ echo "selected";}?>>July</option>
            <option value="August" <? if ($_POST['month']=="August"){ echo "selected";}?>>August</option>
            <option value="September" <? if ($_POST['month']=="September"){ echo "selected";}?>>September</option>
            <option value="October" <? if ($_POST['month']=="October"){ echo "selected";}?>>October</option>
            <option value="November" <? if ($_POST['month']=="November"){ echo "selected";}?>>November</option>
            <option value="December" <? if ($_POST['month']=="December"){ echo "selected";}?>>December</option>
          </select>

line 304 - Undefined index:  year
line 304 begins with the if statement as well.  
<select name="year" id="year">
            <?
              for($i=1980; $i<=date('Y')-17; $i++)
              {
              echo "<option value='$i'";
               if ($_POST['year']==$i){ echo "selected";}
              echo ">$i</option>";
              }
             
              ?>
          </select>

0
Comment
Question by:acicalla
  • 13
  • 9
22 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 total points
ID: 16947635
Hi acicalla,

If you did not have a POST form field with the name of UserName, then there would be no 'UserName' index inside the $_POST array. You can do:

print_r($_POST);

and notice that there will be no UserName!. Usually, you do not need to do

$_POST['UserName'] != ''

You can instead do:

if (!empty($_POST['UserName']) && etc. etc.

empty is a combination of isset() and testing for whether it is empty or not. When you do something like:

if (isset($_POST))

you are just checking whether the entire array exists or not. (isset => is set?)

By doing if (isset($_POST['UserName'])) you are checking whether the variable $_POST['UserName'] exists. The $_POST array can exist without having a 'UserName' index. For instance, it could have 'FirstName' index or other stuff.

empty() is just testing for existance and for whether the user entered anything so it's killing two birds with one stone.

Regards,
Ted
0
 

Author Comment

by:acicalla
ID: 16947708
ok so if I'm understanding this correct the undefined index would be a result of there not being a form field specifically the 'id='UserName" ' named needs to be UserName.  Here is the form entry for the above errors.  Also remember that I am learning while repairing someone else's code and trying to learn how php relates at the same time.
UserName
<tr>
      <td width="160" align="right" class="form_definitions">
        <span class="style2">
        <? if(isset($_POST['UserName']) && $_POST['UserName']==""){
              echo "<font color=red>Username*</font>";
              } else{
              echo"Username*";
        }?>
      </span>      </td>
      <td width="250" align="left"><input name="UserName" type="text" id="UserName2"  value="<? if (isset($_POST['UserName'])){ echo $_POST['UserName']; }  ?>" size="24" maxlength="24"></td>
      <td width="286" align="left"><span class="form_informations style2">Model username will be visible to other in the text chat and in different parts of the site. Try to choose one that best represents the model. </span></td>
    </tr>


Day, month and year

<tr>
      <td align="right" class="form_definitions style2">Date of Birth</td>
      <td align="left"><span class="style2">
        <select name="day" id="day">
          <?
              for($i=01; $i<=31; $i++)
              {
              echo "<option value='$i'";
              if ($_POST['day']==$i){ echo "selected";}
              echo">$i</option>";
              }
              ?>
        </select>
          <select name="month" id="month">
            <option value="January" <? if ($_POST['month']=="January"){ echo "selected";} else if (!isset($_POST['month'])){ echo "selceted";}?>>January</option>
            <option value="February" <? if ($_POST['month']=="February"){ echo "selected";}?>>February</option>
            <option value="March" <? if ($_POST['month']=="March"){ echo "selected";}?>>June</option>
            <option value="July" <? if ($_POST['month']=="July"){ echo "selected";}?>>July</option>
            <option value="August" <? if ($_POST['month']=="August"){ echo "selected";}?>>August</option>
            <option value="September" <? if ($_POST['month']=="September"){ echo "selected";}?>>September</option>
            <option value="October" <? if ($_POST['month']=="October"){ echo "selected";}?>>October</option>
            <option value="November" <? if ($_POST['month']=="November"){ echo "selected";}?>>November</option>
            <option value="December" <? if ($_POST['month']=="December"){ echo "selected";}?>>December</option>
          </select>
          <select name="year" id="year">
            <?
              for($i=1980; $i<=date('Y')-17; $i++)
              {
              echo "<option value='$i'";
               if ($_POST['year']==$i){ echo "selected";}
              echo ">$i</option>";
              }
             
              ?>
          </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>



0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16947713
acicalla,

Hm... upon looking at it again, I may be looking at the wrong part of the code. Tell you what, do print_r($_POST); at the top and post what it contains.

Ted
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:acicalla
ID: 16948211
I added  like this <?php
print_r($_POST);
if($_POST['UserName']!="" && $_POST['Password1']!="" && $_POST['Password2']!="" && $_POST['Email']!="" && $_POST['Category'] !="" && $_POST['Name'] !="" && $_POST['Country'] !="" && $_POST['State'] !="" && $_POST['City'] !=""&& $_POST['ZipCode'] !="" && $_POST['Adress'] !=""  && $_POST['birth']!="" && $_POST['ss']!="" && $_POST['idnumber']!=""&& $_POST['phone']!="" && $_FILES['ImageFile']['tmp_name']!="" && $_FILES['ActImage']['tmp_name']!="" && $_FILES['RImage']['tmp_name']!=""){

To the code and below is the source from the page loading in a browser.


Array
(
)
<br />
<b>Notice</b>:  Undefined index:  UserName in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>15</b><br />
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
body {
      background-color: #000000;
}
.style3 {font-size: 14px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
.style4 {color: #666666}
.style5 {color: #999999}
.style6 {font-size: 10px}
-->
</style>
</head>

<body>
<TABLE BORDER="0" align="center" CELLPADDING="0" CELLSPACING="0">
  <TR>
    <TD align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="201">
        <param name="movie" value="movie.swf">
        <param name="quality" value="high">
        <embed src="movie.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="201"></embed></object></TD>
  </TR>  <TR>
    <TD height="32" background="../../images/lbar.gif">
      <table width="720" border="0" align="center" cellpadding="0" cellspacing="1">
        <tr class="left">
          <td width="109" align="center"><a href="/cp/chatoperators/index.php" class="meniu">CP Home</a></td>
          <td width="109" align="center"><a href="/cp/chatoperators/updateprofile.php" class="meniu">Update Profile</a></td>
          <td width="109" align="center"><a href="/cp/chatoperators/newmodel.php" class="meniu">Add Model </a></td>
          <td width="109" align="center"><a href="/cp/chatoperators/mymodels.php" class="meniu">My Models </a></td>
          <td width="111" align="center" valign="middle"><a href="/cp/chatoperators/payments.php" class="meniu">Payments</a></td>
          <td width="166" align="right"><div align="center"><a href="/logout.php" class="meniu">LogOut</a></div></td>
        </tr>
    </table></TD>
  </TR>
</TABLE>
<form action="newmodel.php" method="post" enctype="multipart/form-data" name="form1" target="_self">
  <table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="52"><span class="big_title style2">Model registration Form</span><br>        <span class="small_title"><span class="style2">Models broadcast live video to our members and get paied for every 30 seconds of Private or Private 2 Way Chat. </span><br>
        </span><span class="small_title">
          <span class="error">
          Please fill all the required fields.        </span> </span></td>
    </tr>
  </table>
  <table width="720" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr bgcolor="#9A0000" class="form_header_title">
      <td height="16" colspan="3" align="center" valign="middle" class="form_header_title"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="form_header_title">Step 1: User Information </td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3" class="form_definitions style2">Login information. Your user will be a unique user.</td>
    </tr>
    <tr>
      <td width="160" align="right" class="form_definitions">
        <span class="style2">
        Username*      </span>      </td>
      <td width="250" align="left"><input name="UserName" type="text" id="UserName2"  value="" size="24" maxlength="24"></td>
      <td width="286" align="left"><span class="form_informations style2">Model username will be visible to other in the text chat and in different parts of the site. Try to choose one that best represents the model. </span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Password*      </span>      </td>
      <td align="left"><input name="Password1" type="password" id="Password1" size="24" maxlength="24"></td>
      <td align="left" class="form_informations style2">*Mimimum 6 characters </td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Password*      </span>      </td>
      <td align="left"><input name="Password2" type="password" id="Password2" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        E-mail*      </span>      </td>
      <td align="left"><input name="Email" type="text" id="Email" value="" size="24" maxlength="24"></td>
      <td align="left" class="form_informations style2">The Models email will not be visible to members and will not be discolsed to other parties. </td>
    </tr>
    <tr>
      <td><span class="style2"></span></td>
      <td><span class="style2"></span></td>
      <td><span class="style2"></span></td>
    </tr>
  </table>
  <br>
  <table width="720" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr bgcolor="#9A0000" class="form_header_title">
      <td height="24" colspan="3" align="center" valign="middle" class="form_header_title"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="form_header_title">Step 2: Profile Details</td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3"><span class="form_definitions style2">This information will be visible to all users (members and guests) visiting the site.</span></td>
    </tr>
    <tr>
      <td width="160" align="right" class="form_definitions style2">Language 1</td>
      <td width="250" align="left" class="form_definitions"><span class="style2">
        <select name="L1" id="L1">
          <option value="Dutch"  selected >Dutch</option>
          <option value="English"  >English</option>
          <option value="French"  >French</option>
          <option value="German"  >German</option>
          <option value="Italian"  >Italian</option>
          <option value="Japanese"  >Japanese</option>
          <option value="Korean"  >Korean</option>
          <option value="Portuguese"  >Portuguese</option>
          <option value="Spanish"  >Spanish</option>
        </select>
      </span></td>
      <td width="286" align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right"><span class="form_definitions style2">Language 2</span></td>
      <td align="left"><span class="style2">
        <select name="L2" id="select">
               <option value="None"  selected >None</option>
          <option value="Dutch"   >Dutch</option>
          <option value="English"  >English</option>
          <option value="French"  >French</option>
          <option value="German"  >German</option>
          <option value="Italian"  >Italian</option>
          <option value="Japanese"  >Japanese</option>
          <option value="Korean"  >Korean</option>
          <option value="Portuguese"  >Portuguese</option>
          <option value="Spanish"  >Spanish</option>
        </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right"><span class="form_definitions style2">Language 3 </span></td>
      <td align="left"><span class="style2">
        <select name="L3" id="select">
          <option value="None"  selected >None</option>
          <option value="Dutch"   >Dutch</option>
          <option value="English"  >English</option>
          <option value="French"  >French</option>
          <option value="German"  >German</option>
          <option value="Italian"  >Italian</option>
          <option value="Japanese"  >Japanese</option>
          <option value="Korean"  >Korean</option>
          <option value="Portuguese"  >Portuguese</option>
          <option value="Spanish"  >Spanish</option>
        </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right"><span class="form_definitions style2">Language 4 </span></td>
      <td align="left"><span class="style2">
        <select name="L4" id="select">
          <option value="None"  selected >None</option>
          <option value="Dutch"   >Dutch</option>
          <option value="English"  >English</option>
          <option value="French"  >French</option>
          <option value="German"  >German</option>
          <option value="Italian"  >Italian</option>
          <option value="Japanese"  >Japanese</option>
          <option value="Korean"  >Korean</option>
          <option value="Portuguese"  >Portuguese</option>
          <option value="Spanish"  >Spanish</option>
        </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Date of Birth</td>
      <td align="left"><span class="style2">
        <select name="day" id="day">
          <option value='1'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>1</option><option value='2'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>2</option><option value='3'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>3</option><option value='4'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>4</option><option value='5'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>5</option><option value='6'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>6</option><option value='7'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>7</option><option value='8'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>8</option><option value='9'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>9</option><option value='10'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>10</option><option value='11'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>11</option><option value='12'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>12</option><option value='13'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>13</option><option value='14'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>14</option><option value='15'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>15</option><option value='16'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>16</option><option value='17'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>17</option><option value='18'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>18</option><option value='19'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>19</option><option value='20'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>20</option><option value='21'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>21</option><option value='22'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>22</option><option value='23'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>23</option><option value='24'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>24</option><option value='25'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>25</option><option value='26'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>26</option><option value='27'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>27</option><option value='28'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>28</option><option value='29'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>29</option><option value='30'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>30</option><option value='31'<br />
<b>Notice</b>:  Undefined index:  day in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />
>31</option>        </select>
          <select name="month" id="month">
            <option value="January" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>290</b><br />
selceted>January</option>
            <option value="February" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>291</b><br />
>February</option>
            <option value="March" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>292</b><br />
>June</option>
            <option value="July" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>293</b><br />
>July</option>
            <option value="August" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>294</b><br />
>August</option>
            <option value="September" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>295</b><br />
>September</option>
            <option value="October" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>296</b><br />
>October</option>
            <option value="November" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>297</b><br />
>November</option>
            <option value="December" <br />
<b>Notice</b>:  Undefined index:  month in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>298</b><br />
>December</option>
          </select>
          <select name="year" id="year">
            <option value='1980'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1980</option><option value='1981'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1981</option><option value='1982'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1982</option><option value='1983'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1983</option><option value='1984'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1984</option><option value='1985'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1985</option><option value='1986'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1986</option><option value='1987'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1987</option><option value='1988'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1988</option><option value='1989'<br />
<b>Notice</b>:  Undefined index:  year in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>305</b><br />
>1989</option>          </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Bra Size </td>
      <td align="left"><input name="BraSize" type="text" id="BraSize" value="" size="4" maxlength="4"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Birth Sign </td>
      <td align="left"><input name="BirthSign" type="text" id="BirthSign" value=""size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Weight</td>
      <td align="left"><span class="style2">
        <input name="Weight" type="text" id="Weight" size="4" value="" maxlength="4">
          <select name="weightMeasure" id="select2">
            <option value="kg" selected >Kg</option>
            <option value="pd"  >Pounds</option>
          </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Height</td>
      <td align="left"><span class="style2">
        <input name="Height" type="text" id="Height" value="" size="4" maxlength="4">
          <select name="heightMeasure" id="select3">
            <option value="cm" selected >Centimeters</option>
            <option value="in"   >Inch</option>
          </select>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Eye Color </td>
      <td align="left"><input name="eyeColor" type="text" id="eyeColor" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Ethinicity</td>
      <td align="left"><input name="Ethnic" type="text" id="Ethnic" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Hair Color </td>
      <td align="left"><input name="hairColor" type="text" id="hairColor" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Hair Length </td>
      <td align="left"><input name="hairLength" type="text" id="hairLength" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Pubic Hair </td>
      <td align="left"><input name="pubicHair" type="text" id="pubicHair" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Broadcasting from </td>
      <td align="left"><input name="location" type="text" id="location" value="" size="24" maxlength="24"></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Message For visitors </td>
      <td align="left"><span class="style2">
        <textarea name="Message" cols="24" rows="5" id="Message">        </textarea>
      </span></td>
      <td align="left" valign="top"><span class="form_informations style2">Maximum 32 characters, this message is displayed next to your thumbnail image when a visitors browses the models galleries..</span></td>
    </tr>
    <tr>
      <td height="12" align="right" class="form_definitions style2">&nbsp;</td>
      <td height="12" align="left"><span class="style2"></span></td>
      <td height="12" align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Favourite Position</td>
      <td align="left"><span class="style2">
        <textarea name="Position" cols="24" rows="5" id="Position">        </textarea>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td height="12" align="right" class="form_definitions style2">&nbsp;</td>
      <td height="12" align="left"><span class="style2"></span></td>
      <td height="12" align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Fantasies</td>
      <td align="left"><span class="style2">
        <textarea name="Fantasies" cols="24" rows="5" id="Fantasies">        </textarea>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td height="12" align="right" class="form_definitions style2">&nbsp;</td>
      <td height="12" align="left"><span class="style2"></span></td>
      <td height="12" align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Hobbies</td>
      <td align="left"><span class="style2">
        <textarea name="Hobbies" cols="24" rows="5" id="Hobbies">        </textarea>
      </span></td>
      <td align="left"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions"><span class="style2">
        Thumbnail Image*      </span></td>
      <td align="left"><input name="Category" id="Category" type="hidden" value="Model"><input name="ImageFile" type="file" id="ImageFile" value="asdf"></td>
      <td align="left"><span class="form_informations style2">This picture is displayed when a visitor browses the models galleries.Choose a representative image, as appealing as possible. </span></td>
    </tr>
  </table>
  <br>
  <table width="720" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr bgcolor="#9A0000" class="form_header_title">
      <td height="24" colspan="3" align="center" valign="middle" class="form_header_title"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="form_header_title">Step 3: Personal information</td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3" class="form_definitions style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="24">
          <param name="movie" value="topsecret.swf">
          <param name="quality" value="high">
          <embed src="topsecret.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="24"></embed>
        </object>
      This informations are kept confidential and never displayed o disclose to others <br>
      (internal use only).We primarely use the info to verify your identity. </td>
    </tr>
    <tr>
      <td width="160" align="right" class="form_definitions"><span class="style2">
        Full Name*      </span>      </td>
      <td width="250" align="left"><input name="Name" type="text" id="Name" value="" size="24" maxlength="24"></td>
      <td width="286"><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Country*</td>
      <td align="left"><span class="style2">
        <select name="Country" id="Country">
          <option value='62'>Australia</option><option value='14'>Azerbaijan</option><option value='15'>Bahrain</option><option value='17'>Belgium</option><option value='19'>Brasil</option><option value='21'>British Virgin Islands</option><option value='22'>Brunei</option><option value='23'>Bulgaria</option><option value='61'>Canada</option><option value='27'>Chile</option><option value='28'>China</option><option value='30'>Cote d Ivoire</option><option value='31'>Croatia</option><option value='32'>Cyprus</option><option value='34'>Czech Republic</option><option value='35'>Denmark</option><option value='36'>Egypt</option><option value='37'>Estonia</option><option value='38'>Ethiopia</option><option value='39'>Faroe Islands</option><option value='40'>Fiji</option><option value='41'>Finland</option><option value='42'>France</option><option value='43'>Georgia</option><option value='44'>Germany</option><option value='45'>Gibraltar</option><option value='46'>Greece</option><option value='47'>Hong Kong</option><option value='48'>Hungary</option><option value='49'>India</option><option value='2'>Italy</option><option value='50'>Japan</option><option value='51'>Jerusalem</option><option value='52'>Moldova</option><option value='53'>Netherlands</option><option value='54'>Norway</option><option value='1'>Romania</option><option value='56'>Russia</option><option value='57'>Saudi Arabia</option><option value='64'>Singapore</option><option value='59'>Spain</option><option value='60'>U.S.A</option><option value='8'>United Kingdom</option>        </select>
&nbsp;</span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions"><span class="style2">
        State*      </span>      </td>
      <td align="left"><input name="State" type="text" id="State" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        City*      </span>      </td>
      <td align="left"><input name="City" type="text" id="City" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Zip Code*      </span>      </td>
      <td align="left"><input name="ZipCode" type="text" id="ZipCode" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Phone*      </span>      </td>
      <td align="left"><input name="phone" type="text" id="phone" value="" size="24" maxlength="24"></td>
      <td class="form_informations style2"> (999) 999-9999 </td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Street Adress*      </span>      </td>
      <td align="left"><span class="style2">
        <textarea name="Adress" cols="24" rows="5" id="Adress">        </textarea>
      </span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Primary Photo ID*      </span>      </td>
      <td align="left"><input name="ActImage" type="file" id="ActImage" value=""></td>
      <td class="form_informations style2">We need to have a scanned/digital photo of the Primary-ID to complete the confirmation process.</td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2"> Primary-ID Type </td>
      <td align="left"><span class="style2">
        <select name="idtype" id="select4">
          <option value="IDcard" selected <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>557</b><br />
selceted>ID card</option>
          <option value="Passport" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>558</b><br />
>Passport</option>
          <option value="Driverslicense" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>559</b><br />
>Drivers license</option>
        </select>
      </span>      </td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2"> Primary-ID Issue Date </td>
      <td align="left"><span class="style2">
        <select name="idmonth" id="select4">
          <option value="January" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>568</b><br />
selceted>January</option>
          <option value="February" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>569</b><br />
>February</option>
          <option value="March" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>570</b><br />
>March</option>
          <option value="April" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>571</b><br />
>April</option>
          <option value="May" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>572</b><br />
>May</option>
          <option value="June" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>573</b><br />
>June</option>
          <option value="July" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>574</b><br />
>July</option>
          <option value="August" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>575</b><br />
>August</option>
          <option value="September" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>576</b><br />
>September</option>
          <option value="October" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>577</b><br />
>October</option>
          <option value="November" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>578</b><br />
>November</option>
          <option value="December" <br />
<b>Notice</b>:  Undefined index:  idmonth in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>579</b><br />
>December</option>
        </select>
          <select name="idyear" id="select5">
            <option value='1980'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1980</option><option value='1981'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1981</option><option value='1982'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1982</option><option value='1983'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1983</option><option value='1984'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1984</option><option value='1985'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1985</option><option value='1986'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1986</option><option value='1987'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1987</option><option value='1988'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1988</option><option value='1989'<br />
<b>Notice</b>:  Undefined index:  idyear in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>586</b><br />
>1989</option>          </select>
      </span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Primary-ID Number:*      </span>      </td>
      <td align="left"><input name="idnumber" type="text" id="idnumber" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Place of birth*      </span>      </td>
      <td align="left"><input name="birth" type="text" id="birth" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Social Security Number(USA Only)*      </span>      </td>
      <td align="left"><input name="ss" type="text" id="ss" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2"> Fax </td>
      <td align="left"><input name="fax" type="text" id="fax" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">MSN Messenger Identifyer </td>
      <td><input name="msn" type="text" id="msn" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Yahoo Messenger Identifyer </td>
      <td><input name="yahoo" type="text" id="ZipCode33" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">ICQ Messenegr Identifyer </td>
      <td><input name="icq" type="text" id="ZipCode32" value="" size="24" maxlength="24"></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions">
        <span class="style2">
        Representative Image*      </span>      </td>
      <td align="left"><input name="RImage" type="file" id="RImage" value=""></td>
      <td class="form_informations style2">Representative image, .</td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">&nbsp;</td>
      <td><span class="style2"></span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr bgcolor="#9A0000">
      <td colspan="3" class="form_definitions"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="style2"><span class="style3">Step 4: Recieve Money Info </span></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3" class="form_definitions style2">This information will be used in order to send model the money. Money is sent once a month on the 24.</td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Minimum Payment </td>
      <td align="left"><span class="style2">
        <select name="PMini" id="PMini">
          <option value="100"   >100</option>
          <option value="250"   >250</option>
          <option value="500"  selected >500</option>
          <option value="1000"   >1000</option>
          <option value="2500"   >2500</option>
          <option value="5000"   >5000</option>
        </select>
      </span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Payment Method</td>
      <td align="left"><span class="style2">
        <select name="PMethod" id="PMethod">
          <option value="wu">Western Union</option>
          <option value="wt">Wire Transfer</option>
        </select>
      </span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr>
      <td align="right" class="form_definitions style2">Payment Information</td>
      <td align="left"><span class="style2">
        <textarea name="PInfo" cols="24" rows="5" id="PInfo">        </textarea>
      </span></td>
      <td><span class="style2"></span></td>
    </tr>
    <tr bgcolor="#9A0000">
      <td colspan="3"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="style2"><span class="style3">Step 5: Complete your subscription </span></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3" class="form_definitions style2">Your details will be reviewd by an administrator and if approoved you will recieve a confirmation email.</td>
    </tr>
    <tr>
      <td colspan="3" class="form_definitions style2"><br />
<b>Notice</b>:  Undefined index:  checkbox in <b>/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>717</b><br />
<font color=red>You must agree with the terms and conditions in order to use our services:</font><br>          <input name="checkbox" type="checkbox" value="checkbox" >
      I Agree the Terms and Conditions. <a href="../agreement" class="left">Read the Terms and Conditions here. </a><br>
      Send registration emails as::
      <input name="emailtype" type="radio" value="text" checked>
Plain text
<input name="emailtype" type="radio" value="html">
Html</td>
    </tr>
    <tr>
      <td><span class="style2"></span></td>
      <td><input name="Submit" type="submit" value=" I Agree the Terms and Conditions"></td>
      <td><span class="style2"></span></td>
    </tr>
  </table>
  <table width="720" border="0" align="center" cellpadding="0" cellspacing="0" class="form_definitions">
     <tr>
    <td align="center" bgcolor="#000000"><span class="style2">-------------------------------------------------------------------------------------------------------------------</span></td>
  </tr>
    </table>
</form>
</body>
</html>
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948219
Yes, because $_POST is completely empty at the beginning, you need to check its existence with either isset or !empty first before using it or comparing it to the empty string. You need to do this for all the undefined index errors. It's a hassle, but it must be done.
0
 

Author Comment

by:acicalla
ID: 16948339
like this, but when I do that I now get error source below
<?php
print_r($_POST);
if (isset($_POST['UserName']!="" && $_POST['Password1']!="" && $_POST['Password2']!="" && $_POST['Email']!="" && $_POST['Category'] !="" && $_POST['Name'] !="" && $_POST['Country'] !="" && $_POST['State'] !="" && $_POST['City'] !=""&& $_POST['ZipCode'] !="" && $_POST['Adress'] !=""  && $_POST['birth']!="" && $_POST['ss']!="" && $_POST['idnumber']!=""&& $_POST['phone']!="" && $_FILES['ImageFile']['tmp_name']!="" && $_FILES['ActImage']['tmp_name']!="" && $_FILES['RImage']['tmp_name']!="")){

      $errorMsg="";
      
      //real username
      $replacevalues = array('&','/'," ","?","+","%","$","#","@");
      $username=str_replace($replacevalues,"", $_POST['UserName']);
      
      //if username already exists
      $result = mysql_query("SELECT user FROM chatmodels WHERE user='$username'");
      if (mysql_num_rows($result)>=1){
            $errorMsg.="Username exists, please choose another one!<br>";
      }  else {
            //if dir still exists
            @rmdir("../../models/".$username."/");
            @mkdir("../../models/".$username."/");
                  
            //if password are correct
            if($_POST['Password1']!=$_POST['Password2']) {
                  $errorMsg.="Passwords do not match<br>";
            } else      if(strlen($_POST['Password1'])<6){
                  $errorMsg.="Passwords must be at least 6 characters long<br>";
            }

            //user ID
            $dateRegistered=time();
            $currentTime=date("YmdHis");
            $userId=md5("$currentTime".$_SERVER['REMOTE_ADDR']);

            //calculates some time
            $day=$_POST['day'];
            if ($day<10){$day="0".$day;}
            $currentSeconds=strtotime($day." ".$_POST['month']." ".$_POST['year']);

            //makes the users folder in models folder
            $urlThumbnail="../../models/".$_POST['UserName']."/thumbnail.jpg";
            $urlIdentityImage="../../models/".$_POST['UserName']."/".$userId.".jpg";
            $urlRImage="../../models/".$_POST['UserName']."/representative.jpg";

            //we copy the thumbail image
            if (!@copy($_FILES['ImageFile']['tmp_name'],$urlThumbnail)){
            $errorMsg.="Thumbnail image file could not be copied, please try again.<br>";
            }
            //we copy the id image
            if (!@copy($_FILES['ActImage']['tmp_name'],$urlIdentityImage)){
            $errorMsg.="ID image file could not be copied, please try again.<br>";
            }
            //we copy the R image
            if (!@copy($_FILES['RImage']['tmp_name'],$urlRImage)){
            $errorMsg.="Representative image file could not be copied, please try again.<br>";
            }
      }
            $db_pass=md5($_POST['Password1']);

            if ($errorMsg==""){
                  mysql_query("INSERT INTO `chatmodels` ( id , user , password , email , language1 , language2 ,language3,language4, birthDate , braSize , birthSign , weight , weightMeasure , height , heightMeasure , eyeColor , ethnicity , message , position , fantasies , hobby , hairColor , hairLength , pubicHair , tImage , cpm , epercentage ,minimum, category , name , country , state , city , zip , adress , actImage , pMethod , pInfo , dateRegistered , owner , lastLogIn , phone ,fax, idtype , idmonth , idyear , idnumber , birthplace , ssnumber , msn , yahoo , icq , broadcastplace, emailtype,  status , lastupdate) VALUES ('$userId','$_POST[UserName]' , '$db_pass', '$_POST[Email]', '$_POST[L1]', '$_POST[L2]', '$_POST[L3]', '$_POST[L4]', '$currentSeconds', '$_POST[BraSize]', '$_POST[BirthSign]', '$_POST[Weight]', '$_POST[weightMeasure]', '$_POST[Height]', '$_POST[heightMeasure]', '$_POST[eyeColor]', '$_POST[Ethnic]', '$_POST[Message]', '$_POST[Position]', '$_POST[Fantasies]', '$_POST[Hobbies]','$_POST[hairColor]','$_POST[hairLength]','$_POST[pubicHair]','Thumbnail Image', '295', '30','500','$_POST[Category]', '$_POST[Name]', '$_POST[Country]', '$_POST[State]','$_POST[City]', '$_POST[ZipCode]', '$_POST[Adress]', 'IdentityImage', '$_POST[PMethod]', '$_POST[PInfo]','$dateRegistered','$sopusername','$dateRegistered','$_POST[phone]','$_POST[fax]','$_POST[idtype]','$_POST[idmonth]','$_POST[idyear]','$_POST[idnumber]','$_POST[birth]','$_POST[ss]','$_POST[msn]','$_POST[yahoo]','$_POST[icq]','$_POST[location]','$_POST[emailtype]','pending','00')");
                  header ("Location: modelregistered.php");
            }
}
else
{
$errorMsg="Please fill all the required fields.";
}
?>



ERROR SOURCE
<br />
<b>Parse error</b>:  parse error, unexpected T_IS_NOT_EQUAL, expecting ',' or ')' in <b>/var/www/vhosts/topcamshow.com/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>15</b><br />

0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948343
It should be

if (!empty($_POST['UserName']) && !empty($_POST['Password1']) && etc. etc.
0
 

Author Comment

by:acicalla
ID: 16948359
I just changed it to

<?php
print_r($_POST);
if (isset($_POST['UserName']) && (isset($_POST['Password1']) && (isset($_POST['Password2']) && (isset($_POST['Email']) && (isset($_POST['Category']) && (isset($_POST['Name']) && (isset($_POST['Country']) && (isset($_POST['State']) && (isset($_POST['City']) && (isset($_POST['ZipCode']) && (isset($_POST['Adress']) && (isset($_POST['birth']) && (isset($_POST['ss']) && (isset($_POST['idnumber']) && (isset($_POST['phone']) && (isset($_FILES['ImageFile']['tmp_name']) && (isset($_FILES['ActImage']['tmp_name']) && (isset($_FILES['RImage']['tmp_name'])))
{  

After re-reading your posts above.  I get this error now.
<br />
<b>Parse error</b>:  parse error, unexpected '{' in <b>/var/www/vhosts/topcamshow.com/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>15</b><br />
0
 

Author Comment

by:acicalla
ID: 16948362
sec switching to !empty and will repost
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948369
I think you are having errors because you have extra parentheses ;-)
0
 

Author Comment

by:acicalla
ID: 16948373
Ok it's now
<?php
print_r($_POST);
if (!empty($_POST['UserName']) && (!empty($_POST['Password1']) && (!empty($_POST['Password2']) && (!empty($_POST['Email']) && (!empty($_POST['Category']) && (!empty($_POST['Name']) && (!empty($_POST['Country']) && (!empty($_POST['State']) && (!empty($_POST['City']) && (!empty($_POST['ZipCode']) && (!empty($_POST['Adress']) && (!empty($_POST['birth']) && (!empty($_POST['ss']) && (!empty($_POST['idnumber']) && (!empty($_POST['phone']) && (!empty($_FILES['ImageFile']['tmp_name']) && (!empty($_FILES['ActImage']['tmp_name']) && (!empty($_FILES['RImage']['tmp_name'])))
{
      $errorMsg="";

And I get this error


<br />
<b>Parse error</b>:  parse error, unexpected '{' in <b>/var/www/vhosts/topcamshow.com/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>16</b><br />
0
 

Author Comment

by:acicalla
ID: 16948377
Should the $_FILES have (!empty()) around it as well?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948387
Yes. But what you have is this:

(!empty($_POST['UserName'])

It's alright (although unnecessary) to have the parentheses around the !empty() but you are missing a closing parentheses on every one! It should be

(!empty($_POST['UserName']))

or just

!empty($_POST['UserName'])
0
 

Author Comment

by:acicalla
ID: 16948396
<?php
print_r($_POST);
if (!empty($_POST['UserName'])) && (!empty($_POST['Password1'])) && (!empty($_POST['Password2'])) && (!empty($_POST['Email'])) && (!empty($_POST['Category'])) && (!empty($_POST['Name'])) && (!empty($_POST['Country'])) && (!empty($_POST['State'])) && (!empty($_POST['City'])) && (!empty($_POST['ZipCode'])) && (!empty($_POST['Adress'])) && (!empty($_POST['birth'])) && (!empty($_POST['ss'])) && (!empty($_POST['idnumber'])) && (!empty($_POST['phone'])) && (!empty($_FILES['ImageFile']['tmp_name'])) && (!empty($_FILES['ActImage']['tmp_name'])) && (!empty($_FILES['RImage']['tmp_name']))
{
      $errorMsg="";

I noticed it and fixed that but It doesn't seem the like the && operators now I get

<br />
<b>Parse error</b>:  parse error, unexpected T_BOOLEAN_AND in <b>/var/www/vhosts/topcamshow.com/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>15</b><br />


And in the editor that I am using the ending { and the first && have red marks under them.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948404
Your parentheses are still getting messed up, lol. It should be:

if (!empty($_POST['UserName']) && !empty($_POST['Password1']) && !empty($_POST['Password2']) && !empty($_POST['Email']) && !empty($_POST['Category']) && !empty($_POST['Name']) && !empty($_POST['Country']) && !empty($_POST['State']) && !empty($_POST['City']) && !empty($_POST['ZipCode']) && !empty($_POST['Adress']) && !empty($_POST['birth']) && !empty($_POST['ss']) && !empty($_POST['idnumber']) && !empty($_POST['phone']) && !empty($_FILES['ImageFile']['tmp_name']) && !empty($_FILES['ActImage']['tmp_name']) && !empty($_FILES['RImage']['tmp_name']))
{

Also, I noticed that you spelled Adress wrong (should be Address). I'm not sure if it's a typo or if it's supposed to be this way, so I just thought I'd bring it to your attention.
0
 

Author Comment

by:acicalla
ID: 16948416
ok now it's

<?php
print_r($_POST);
if (!empty($_POST['UserName']) && !empty($_POST['Password1']) && !empty($_POST['Password2']) && !empty($_POST['Email']) && !empty($_POST['Category']) && !empty($_POST['Name']) && !empty($_POST['Country']) && !empty($_POST['State']) && !empty($_POST['City']) && !empty($_POST['ZipCode']) && !empty($_POST['Adress']) && !empty($_POST['birth']) && !empty($_POST['ss']) && !empty($_POST['idnumber']) && !empty($_POST['phone']) && !empty($_FILES['ImageFile']['tmp_name']) && !empty($_FILES['ActImage']['tmp_name']) && !empty($_FILES['RImage']['tmp_name']))
{

ya, I know about the spelling.  I'm learning php and helping a friend with fix this code.  He paid some guy out of india to write if but they guy didn't finish it.  I learn best from seeing the code and working with it in situations like this so the spelling will come next once I got it all working right.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948426
Aite. How does it work now?
0
 

Author Comment

by:acicalla
ID: 16948427
<?
              for($i=01; $i<=31; $i++)
              {
              echo "<option value='$i'";
              if (!empty($_POST['day']==$i)){ echo "selected";}
              echo">$i</option>";
              }
              ?>
The error is

<br />
<b>Parse error</b>:  parse error, unexpected T_IS_EQUAL, expecting ',' or ')' in <b>/var/www/vhosts/topcamshow.com/httpdocs/cp/chatoperators/newmodel.php</b> on line <b>284</b><br />


So I obviously got the () in the wrong places.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948437
Try:

for ($i = 1; $i <= 31; $i++)
{
    echo '<option value="' . $i . '"';

    if (!empty($_POST['day']) && $_POST['day'] == $i)
    {
        echo ' selected';
    }

    echo '>' . $i . '</option>';
}
0
 

Author Comment

by:acicalla
ID: 16948509
They syntax on this seems to be different I added it to the first like below to test it.

 ?>
        </select>
          <select name="month" id="month">
            <option value="January" <? if (!empty($_POST['month']=="January"){ echo "selected";} else if ($_POST['month'])){ echo "selceted";}?>>January</option>
            <option value="February" <? if ($_POST['month']=="February"){ echo "selected";}?>>February</option>
            <option value="March" <? if ($_POST['month']=="March"){ echo "selected";}?>>June</option>
            <option value="July" <? if ($_POST['month']=="July"){ echo "selected";}?>>July</option>
            <option value="August" <? if ($_POST['month']=="August"){ echo "selected";}?>>August</option>
            <option value="September" <? if ($_POST['month']=="September"){ echo "selected";}?>>September</option>
            <option value="October" <? if ($_POST['month']=="October"){ echo "selected";}?>>October</option>
            <option value="November" <? if ($_POST['month']=="November"){ echo "selected";}?>>November</option>
            <option value="December" <? if ($_POST['month']=="December"){ echo "selected";}?>>December</option>
          </select>
          <select name="year" id="year">
            <?
0
 

Author Comment

by:acicalla
ID: 16948521
The rest of the other options are like the one above that I will have to update. Trying a few different ways and will repost.
0
 

Author Comment

by:acicalla
ID: 16948569
This did it for me, and thank you again for the help. I'm working through the last few of them and will be done shortly.  I will close the post as soon as I finish.  

 ?>
        </select>
          <select name="month" id="month">
            <option value="January" <? if (!empty($_POST['month']) && $_POST['month']=="January"){ echo "selected";} else if (!empty($_POST['month'])){ echo "selceted";}?>>January</option>
            <option value="February" <? if (!empty($_POST['month']) && $_POST['month']=="February"){ echo "selected";}?>>February</option>
            <option value="March" <? if (!empty($_POST['month']) && $_POST['month']=="March"){ echo "selected";}?>>June</option>
            <option value="July" <? if (!empty($_POST['month']) && $_POST['month']=="July"){ echo "selected";}?>>July</option>
            <option value="August" <? if (!empty($_POST['month']) && $_POST['month']=="August"){ echo "selected";}?>>August</option>
            <option value="September" <? if (!empty($_POST['month']) && $_POST['month']=="September"){ echo "selected";}?>>September</option>
            <option value="October" <? if (!empty($_POST['month']) && $_POST['month']=="October"){ echo "selected";}?>>October</option>
            <option value="November" <? if (!empty($_POST['month']) && $_POST['month']=="November"){ echo "selected";}?>>November</option>
            <option value="December" <? if (!empty($_POST['month']) && $_POST['month']=="December"){ echo "selected";}?>>December</option>
          </select>
          <select name="year" id="year">
            <?
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question