Hi,
I am busy working on the following page
[URL=”http://www.photographytours.co.za/bookings2.php”]http://www.photographytours.co.za/bookings2.php
I have utilized the coding that came with this Captcha script and it has worked for the quick enquiry forms and contact page. But for the bookings page, there is a problem – i just want to add the captcha code at the bottom – which i have added, and for the popup (validation scripts) that come up to check if it is correct or not. So it needs to work differently to the other pages, as i don’t know how to edit the coding I have already done to make this page work.
So, I don’t know how to do this.
[B]The incl script file that checks the form looks like this:
function checkform() {
msg = “”;
// contact details
if (document.frm.fname.value == “”) msg = msg + “- First Namen”;
if (document.frm.lname.value == “”) msg = msg + “- Last Namen”;
if (!emailcheck(document.frm.email.value)) msg = msg + “- A valid email addressn”;
if (document.frm.country.value == “”) msg = msg + “- Countryn”;
if (document.frm.number.value == “” || isNaN(document.frm.number.value)) msg = msg + “- Number of Travellersn”;
// Arrival & Departure
if (!check2dates(“arrival_date”,”depart_date”)) msg = msg + “- Your Arrival and Departure Datesn”;
if (document.frm.where.value == “”) msg = msg + “- Where did you hear about usn”;
// display the form check
if (msg!=””)
{
alert (“Please complete the following:rnrn”+msg);
return false;
}
}
[B]and the script that is supposed to check that the capcha code works looks like this:
<?php
if(empty($_SESSION[‘6_letters_code’] ) ||
strcasecmp($
{
//Note: the captcha code is compared case insensitively.
//if you want case sensitive match, update the check above to
// strcmp()
$errors .= “n The captcha code does not match!”;
}
?
I somehow need to integrate these 2 together. but the one is php and the other is js?
Any help would be much appreciated!
Leigh