jquery with sql server database html -


i want submit data jquery html form sql server,my form has check box,radio,dropdown list....so how can select data these element , how send database..i created database these fields...anyone me out

you didn't tell use on server-side assume php.

if have form:

<form>     <input type="text" id="mytext" value="foo" />     <button onclick="send()" value="send" /> </form> 

you can send server way:

function send() {     var mytext = $('#mytext').val();     var result;     $.ajax({         type: "post",         url: "process_form.php",         data: {             "mytext" : mytext         },         async: true,         datatype: "html",         success: function(response) {              result = response;         },         error: function(response) {             alert("oh no! error occured!");         }     });     return result; } 

of course, work need process_form.php accepts post parameter called mytext. like:

<?php if (isset($_post['mytext'])) {     echo "you sent text: " . $_post['mytext']; } ?> 

the php script can communicate database too. numerous tutorials exist on topic.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -