1

I am posting a simple form in codeigniter. When I submit the form and echo the $_POST array, it shows me the following:

Array
(
    [first_name] => First Name
    [last_name] => Last Name
    [zip] => Zip Code
    [phone] => Phone
    [email] => e-mail
    [area_interest] => 
    [terms] => terms
    [x] => 14
    [y] => 8
)

The last two fields are really mysterious. I don't know from where they are coming. Any ideas?

This is my form code:

<?PHP 
$attributes=array('method'=>'post');
echo form_open('request-information',$attributes);?>
<table height="180" width="220">
<tr>
    <td>
        <input type="text" name="first_name" id="first_name" class="form-text1 inputfieldform1" value="First Name" onBlur="if(this.value=='') this.value='First Name'" onFocus="if(this.value =='First Name' ) this.value=''" style="width:95px;" />
    </td>
    <td>
        <input type="text" name="last_name" id="last_name" class="form-text1 inputfieldform1" value="Last Name" onBlur="if(this.value=='') this.value='Last Name'" onFocus="if(this.value =='Last Name' ) this.value=''" style="width:95px;" />
    </td>
    </tr>
 <tr>
     <td>
       <input type="text" id="zip_code" name="zip" class="form-text1 inputfieldform1" value="Zip Code" onBlur="if(this.value=='') this.value='Zip Code'" onFocus="if(this.value =='Zip Code' ) this.value=''" style="width:95px;"/>
      </td>
     <td>
       <input type="text" id="phone_number" class="form-text1 inputfieldform1" value="Phone" onBlur="if(this.value=='') this.value='Phone'" onFocus="if(this.value =='Phone' ) this.value=''" style="width:95px;" name="phone"/>
      </td>
 </tr>
   <tr>
      <td colspan="2">
      <input type="text" name="email" id="email" class="form-text1 inputfieldform1" value="e-mail" onBlur="if(this.value=='') this.value='e-mail'" onFocus="if(this.value =='e-mail' ) this.value=''" style="width:205px"/>
      </td>
      </tr>
      <tr>
    <td colspan="2">
         <select style="width:208px; height:20px;" id="interest_area" name="area_interest" class="top2select" >
          <option value="" selected="">Select Area of Interest</option>
          <option value="Arts/Design/Fashion">Arts/Design/Fashion</option>
          <option value="aviation">Aviation</option>
          <option value="Beauty/Cosmetology">Beauty/Cosmetology</option>
          <option value="Business">Business</option>
          <option value="Communication & Mass media ">Communication & Mass media </option>
          <option value="Criminal Justice">Criminal Justice</option>
          <option value="Culinary Arts">Culinary Arts</option>
          <option value="Education">Education</option>
          <option value="Engineering">Engineering</option>
          <option value="Funeral & Mortuary Sciences">Funeral & Mortuary Sciences</option>
          <option value="Health Care">Health Care/Human Services</option>
          <option value="Hospitality">Hospitality</option>
          <option value="Interdisciplinary Studies">Interdisciplinary Studies</option>
          <option value="Legal & Paralegal ">Legal & Paralegal </option>
          <option value="Liberal Arts">Liberal Arts</option>
          <option value="Massage/ Wellness">Massage/ Wellness</option>
          <option value="Trade/Vocational">MBA</option>
          <option value="Nursing">Nursing</option>
          <option value="Sciences">Sciences</option>
          <option value="Social Sciences">Social Sciences</option>
          <option value="Technology/Computer/IT">Technology/Computer/IT</option>          
          <option value="Trade/Vocational">Trade/Vocational</option>
          <option value="undecided">Undecided</option>
           </select>
    </td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" checked="true" value="terms" name="terms">&nbsp;&nbsp;I accept <a href="#" style="text-decoration:underline">terms & conditions</a>
</td>
</td>
</tr>
<tr>

<td colspan="2" style="text-align:center">
<input type="image" src="<?PHP echo base_url();?>images/frontend/bg/search_button1.png">

</td>
</tr>

Regards, Mrinal

1
  • please see above, i have posted the form code as well. Commented Jun 15, 2012 at 7:31

2 Answers 2

3

The X and Y variables are coming from the image input.

These are the coordinates where the user has clicked on.

Read here.

Sign up to request clarification or add additional context in comments.

2 Comments

is there any way to remove this?
use unset($POST['x']) and unset($POST['y']) if you must. You can simply ignore these values.
0

Edit it by placing '/'

 <input type="image" src="<?PHP echo base_url();?>/images/frontend/bg/search_button1.png">

and i think x,y are co-ordinates of the image as @Yan says

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.