Jump to content

Insert record into database


forumnz

Recommended Posts

really easy

 

function ajaxFunction(){

var ajaxRequest;  // The variable that makes Ajax possible!

 

try{

// Opera 8.0+, Firefox, Safari

ajaxRequest = new XMLHttpRequest();

} catch (e){

// Internet Explorer Browsers

try{

ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

} catch (e) {

try{

ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

} catch (e){

 

alert("Your browser broke..!Pls Try Again ...!");

return false;

}

}

}

// Create a function that will receive data sent from the server

ajaxRequest.onreadystatechange = function(){

if(ajaxRequest.readyState == 4){

var ajaxDisplay = document.getElementById('divAdd_PromotionsInfo');

ajaxDisplay.innerHTML = ajaxRequest.responseText;

}

}

 

 

      var csc  = document.getElementById("txtboxname").value;

     

 

  var queryString = "?pcsc="+csc+;

 

ajaxRequest.open("GET", "test.php" + queryString, true);

ajaxRequest.send(null);

}

}

 

 

in the test.php page write the insert qurey and get the message to div tag and display the result

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.