Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery to php code then to database
    text
    copied!<p>I'm trying to pass information from jquery to a database. </p> <p>I have the function in jquery already submitting etc but unsure where to go now. </p> <p>The php I want to get to will be requesting the data but the bit im unsure with is passing my data to this page? PLease not the //NEED TO ADD SOMETHING HERE? bit. </p> <p>I know I Need to add something like a post but unsure how to do this using jquery.</p> <p>Below is the jquery code: </p> <pre><code>$( "#dialog-form" ).dialog({ autoOpen: false, height: 600, width: 1000, modal: true, buttons: { "Create Property": function() { var bValid = true; allFields.removeClass( "ui-state-error" ); bValid = bValid &amp;&amp; checkLength( name, "name", 3, 16 ); bValid = bValid &amp;&amp; checkLength( email, "address1", 6, 80 ); bValid = bValid &amp;&amp; checkLength( password, "address2", 5, 16 ); if ( bValid ) { ***//NEED TO ADD SOMETHING HERE?*** $( this ).dialog( "close" ); } }, Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); </code></pre> <p>Below is the php page I want to pass the data to: </p> <pre><code>if(isset($_REQUEST['submit-property'])) { //Create a new object $property = new Property(""); //Collect the variables passed from REQUEST $name = $_REQUEST['name']; $address1 = $_REQUEST['address1']; $address2 = $_REQUEST['address2']; $address3 = $_REQUEST['address3']; $address4 = $_REQUEST['address4']; $postCode = $_REQUEST['postCode']; etc etc etc </code></pre> <p>Hope someone can help. </p> <p>Thanks alot. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload