Hi Guys
I need a script which will allow me to redirect the user to an external webpage - I have a t&c's page on the site so the user needs to 'accept' t&c's before they are redirected to the thirdparty website.
I used javascript however it seems to not work very well it works every now and again which isnt good enough.
I am thinking of a php script which will allow me to do this
So my html has a checkbox and a submit button - what script would i put on the following page? i have named the tickbox 'terms' and the submit button 'submit' -
The script below seems to work on my test server however my client is using a drag and drop sort of program to build his website. His website seems to use frames / headers.
<?php
$terms = $_POST['terms'];
if($terms == "terms") {
header("Location: http://www.romancart.com/checkavailability.asp?storeid=43296");
}
else {
echo "please accept terms and conditions";
}
?>
The html code is
<form action="t&c.php"method="post">
<p> <FONT SIZE="-1" FACE="Verdana,Tahoma,Arial,Helvetica,Sans-serif,sans-serif">I agree to the Terms & Conditions</FONT>
<input type="CHECKBOX" name="terms" value="terms">
</p>
<p><input type="SUBMIT" name="submit" value="Submit"></p>
</form>
As i say - there seems to be 2 different pages within the file structure - theres body_term_conditions.html and also header_terms_conditions.html
Any help would be great - please try keep it as simple as possible
Thank you
The code which is appearing on his site is
Warning: Cannot modify header information - headers already sent by (output started at /websites/123reg/LinuxPackage21/th/en/ew/thenewlyngarth.co.uk/public_html/html/t&c.php:2) in /websites/123reg/LinuxPackage21/th/en/ew/thenewlyngarth.co.uk/public_html/html/t&c.php on line 7