jquery cakephp: post method alerts the correct result string locally but not working on remote server

The following jquery and cakephp code works perfect on my localhost alerting the correct result_str but it doesn't work on the remote server. I have included the outputs at the end for both localhost and remote server. The post method is working, but not displaying the correct output remotely. I've already verified that the email id i'm entering is exisiting on the remote db. The debug($merryparent_info) in merry_parent model is not displaying at all both locally and remotely. Please take a look at [link to my site][1] When the user enters the parent information email id and presses the tab button, 2 alert boxes pops up. The first one displays the email_id passed in the post method and the second alert displays the result_str. Can someone tell me on where i'm going wrong. I've been trying to solve this for the last 4 days. Thank you. students_controller.php function get_parent_info(){ //$this->layout=false; if (!empty($this->data)){ $merryparent_info=$this->Student->MerryParent->getMerryParents($this->data['MerryParent']['email']); print_r($merryparent_info); echo $merryparent_info['MerryParent']['initial'].'*****'; echo $merryparent_info['MerryParent']['name'].'*****'; echo $merryparent_info['MerryParent']['landline'].'*****'; echo $merryparent_info['MerryParent']['mobile'].'*****'; echo $merryparent_info['MerryParent']['address'].'*****'; echo $merryparent_info['MerryParent']['state_id'].'*****'; echo $merryparent_info['MerryParent']['city_id'].'*****'; echo $merryparent_info['MerryParent']['postal_code'].'*****'; } } merry_parent.php model function getMerryParents($field_value){ if (is_int($field_value)) $conditions=array('merryParent.id'=>$field_value); else $conditions=array('merryParent.email'=>$field_value); //debug($conditions); $merryparent_info=$this->find('first',array( 'conditions'=>$conditions, 'recursive'=>-1 //fetches merry_parents table data only not the associated data )); debug($merryparent_info); return $merryparent_info; } localhost output: first alert email_id: data%5BMerryParent%5D%5Bemail%5D=banana8%40gmail.com second alert result_str: Array ( [MerryParent] => Array ( [id] => 38 [initial] => Ms [name] => banana kaur [username] => banana8 [email] => banana8@gmail.com [password] => 7b311dc3e6d4862caf024b65410c793adfc530bc [landline] => [mobile] => 8487234783 [address] => 99 fruits road [state_id] => 14 [city_id] => 81 [postal_code] => 877979 [created] => 2012-02-08 05:24:49 [modified] => 2012-02-15 15:46:05 ) ) Ms*****banana kaur**********8487234783*****99 fruits road*****14*****81*****877979***** remote server output: first alert email_id: data%5BMerryParent%5D%5Bemail%5D=banana8%40gmail.com second alert result_str: **************************************** [1]: http://www.merryflowers.com/students/add

以上就是jquery cakephp: post method alerts the correct result string locally but not working on remote server的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏