Hi Jon,
Firstly, you need to pull the user record back from the database.
Assuming that you are using session based login security (i.e. Security Assist) then you need to pull back the record based on the user that has logged in.
You then need to create the redirect based on the value of the T&Cs field. You can use the WA Server Redirect behaviour for this and then edit the trigger.
e.g
<?php
if($row_rsuser['tandc'] == "1"){
$WA_Redirect_URL = "test.php";
$WA_Redirect_KeepQS = false;
if ($WA_Redirect_URL != "") {
if ($WA_Redirect_KeepQS && $WA_Redirect_URL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "") {
$WA_Redirect_URL .= ((strpos($WA_Redirect_URL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_Redirect_URL);
}
}
?>
Basically, if the recordset goes in at the top of the page, and this sits under it, if the T&Cs field has a value of 1 it will redirect immediately to the test.php page.
Hope this helps
Cheers
Ian