Jump to content

404 Error


vickyjackson

Recommended Posts

Hi,

Have created a php form to send contact information from my website - the form is sent by email which is recieved instantly but I then get an error (404) saying contact_form.php cannot be found. (This is the page with the php code to send the email which is working. )

the code can be seen below.

<?php

...
$sent = mail($myemail, $subject, $forminfo, "From: <$email>");
if($sent)
{
header("Location: [a href=\"http://www.something.co.uk/thankyou.php?name=$_POST\" target=\"_blank\"]http://www.something.co.uk/thankyou.php?name=$_POST[/a][name]");
}
else
{
echo 'Sorry, your message could not be sent at this time. Please try again or email us directly.';
}
?>

It is not redirecting to the page I ask it to!!

Please help - taken me a long time to get this form working as my hosting company had me on a server which didn't support it!!

Thanks,
Vicky
Link to comment
Share on other sites

error 404 is generated by the server not the PHP code! therefore your problem is that the page contact_form.php has not been saved on the server.. try uploading test.txt with just sumet like test written inside and see if you can access it because u may be uploading to wrong folder..
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.