I have a function which validates a form, which i've cut short just to show what i'm after.
function validate_flight_form ( )
var d = new Date();
var date = d.getDate();
var mon = d.getMonth() + 1;
var pass = document.flight_form.pass.value;
pricing = true;
var value = 0;
valid = true;
else if ((document.flight_form.type.checked) && ((document.flight_form.day.value <= date - 21) && (document.flight_form.month.value == mon + 1) || ((document.flight_form.day.value <= date + 7) && (document.flight_form.month.value == mon + 0 ))))
value = 200;
pricing = false;
if (document.flight_form.pass.value >= 1)
value = pass * value;
Now I want to pass the variable 'value' to price.php to use later, using:
alue=" + value;
My problem is i'm not sure where to put that code in the function as it doesn't seem to work wherever I put it.
price.php is set up just to test if it's working by:
//shorter variable names
$HTTP_POST_VARS = $_POST;
$HTTP_SESSION_VARS = $_SESSION;
//create short variable names
$value = $_POST['value'];
This may not be correct as i'm new to PHP.
Anyone offer any help?