how i can add this variables to the code above? i need to pass these two variables. I tried but the code doesn't work as i expect (alerts doesn't working with the alterations).
name: $('#name').val(),
email: $('#email').val()
<script type="text/javascript">
jQuery(document).ready(function() {
$.ajax("valid.php", {
type: "POST",
dataType: "json",
name: $('#name').val(), //here??
email: $('#email').val() //here??
success: function(step) {
if (step.first) {
alert("fdsgdfg");
}
if (step.second) {
alert("dfgdfg");
}
}
});
});
</script>
thanks!