Hi,
I am using Cakephp and JQuery in my application.
I am having a Form generated in cakePhp.I got the posted values of this form using
echo http_build_query($_POST);
If my form has any field with name as Firstname it is posted as correctly,
But when i have any field in the form with the name as Last name (i.e. with spaces in between ) then ,it is posted like Last_name.How to rectify this error..
My form is generated using
<?php
echo $form->create('Result',array('id'=>"ResultSubmit",'action'=>"submit/".$formid."/".$userid));?>
<?php foreach ($viewfields as $r):
echo $form->input($r['Attribute']['label'], array('id'=>$r['Attribute']['id'],'name'=>$r['Attribute']['label'],'type'=>'text','style' => 'width:' . $r['Attribute']['size'] . 'px'));
?>
<?php endforeach; ?>
<?php echo $form->end('submit');?>
i kept the name for my input field using 'name'=>$r['Attribute']['label']//where it notifies the Label for the field Eg Firstname or Last name
I think i got the cause of the error may be keeping the name ..But how to do so..
Edit:
I have used the Humanize concept in CakePhp and recitified the error...