Hello there i was wondering if this php script is …

Tuesday, 3rd December 2024

Comment on My PHP/ MySQL Restaurant Reservation Form by Lester.

Hello there i was wondering if this php script is usable with this form that i am using.

Here is the js script for the form:

$(document).ready(function(){
$(“#ajax-reservation-form”).submit(function(){
var str = $(this).serialize();
$.ajax( { type: “POST”, url: “reservation.php”, data: str, success: function(msg){
if(msg == ‘OK’) // Message Sent? Show the ‘Thank You’ message and hide the form
{ result = ‘Your message has been sent. Thank you!Our manager will contact you to discuss your staying in our hotel.Reserve another room‘; $(“#reservation_fields”).hide(); }
else
{ result = msg; }
$(“#reservation_note”).html(result);
}
});
return false;
});
});

function reservation_freset(){
$(“#reservation_note”).html(”);
document.getElementById(‘ajax-reservation-form’).reset();
$(“#reservation_fields”).show();
};

Thanks any help would be great

Share this on:

Comments are closed.