1 Replies - 499 Views - Last Post: 02 December 2012 - 03:12 AM

#1 ersaurabh101  Icon User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 25
  • Joined: 18-March 09

Saving multiple row using jquery,html,php not working

Posted 02 December 2012 - 02:59 AM

I want to echo my result in php, then i will try to save it.
Is my jquery code to post data in the php page is ok ?

Please see html,jquery code in jsfiddle- http://jsfiddle.net/gL2yz/
My php code-
<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Methods: POST, GET");
header("Access-Control-Allow-Headers: x-requested-with");

mysql_connect("localhost", "***", "***") or die("Connection Failed");
mysql_select_db("funiks_phonebook")or die("Connection Failed");



$chkbox = $_POST['chkbox'];
$txtbox = $_POST['txtone'];
$txtbox1= $_POST['txttwo'];

/*foreach($txtbox as $a => $B)/>/>/>
  echo "$chkbox[$a]  -  $txtbox[$a]  -  $txtbox1[$a] <br />";*/
   $arr = array('a' => $chkbox, 'b' => $txtbox, 'c' => $txtbox1);
       foreach($arr as $value)
       echo $value . "<br>";
       // echo json_encode($arr);

?>

This post has been edited by Dormilich: 02 December 2012 - 03:10 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Saving multiple row using jquery,html,php not working

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3509
  • View blog
  • Posts: 10,131
  • Joined: 08-June 10

Re: Saving multiple row using jquery,html,php not working

Posted 02 December 2012 - 03:12 AM

and what is the actual problem? I see no jQuery code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1