View Full Version : php forms

12-11-2012, 10:04 PM
Hi folks,

I have added a contact form to my site, which is linked to a php script which does the relevant checks etc and then forwards the email with the info to the relevant address. What is happening is this: (this is after the info is submitted and is seen on the live site.
/./confirmation.html (http://www.yesterdayandtodayltd.co.uk/confirmation.html) (common basename)
/../confirmation.html (http://www.yesterdayandtodayltd.co.uk/confirmation.html) (common basename)I only have one confirmation html page on the server

$after = "confirmation.html";

and this also:
if (mail($recipient,$subject,$message,$headers)) {
echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=$yesterdayandtodayltd.co.uk/confirmation.html\">";
} else {
echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=$oops\">";

Any ideas why this is happening, the above did have the below but I removed the www as I thought this was the problem?


12-12-2012, 12:19 AM
$yesterdayandtodayltd.co.uk/confirmation.html this should not be a string like this , you could add
$address = "www.yesterdayandtodayltd.co.uk/confirmation.html" then reference the string as $address

12-12-2012, 01:27 PM
Thanks for the reply, been messing around and now getting this address in the address bar:


Where is the other .co.uk coming from?

12-12-2012, 01:39 PM
it's ok, found what the problem was :-P all fixed now