PDA

View Full Version : Form Error 404



Sammys Treasurebox
04-17-2007, 03:14 AM
Having problems with making a forum. I try to submit and I get this message, "Not Found
The requested URL /action.php was not found on this server.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."



This is my first form. I've watched the tutorials over and over. I've read the forum posts and tweeked my form a little based on suggestions to other people. No idea what to do.



Any help would be greatly appreciated.




http://www.sammystreasurebox.com/townsquare.html
client id: 13929

Andy128
04-17-2007, 04:30 AM
Did you create an action.php page and upload it to the server?

Please copy and paste the php code you used.

Andy

Sammys Treasurebox
04-17-2007, 05:47 AM
Thank you for helping me. I accidentally put the html in twice which I read in the forums will make it be emailed twice. I'll fix this after I can figure out what the problem is right now. The html is:

<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "fundraisers@sammystreasurebox.com";
$mailsubj = "Town Square Fundraising Inquiry";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>

aconstas1
04-17-2007, 06:01 AM
you have not published a thank you page named action.php in the same folder as the page with the form. You have to create a Thank You page that does the sending. this page has to be named action.php. You must save it as php type, and you must publish it to the same file location as the page with the form.

Andy128
04-17-2007, 06:26 AM
Where did you place this code?


Andy

Sammys Treasurebox
04-17-2007, 11:19 AM
I both are in the public_html folder. The page with the form is a html document. I saved the thank you page twice. Once as an html (on accident) and once as a php. From the tutorial I got the impression the thank you page was the php. Is it the other way around?

bradyx
04-17-2007, 11:26 AM
hello
which password do i use in publishing my web page.
hope to hear from you soon.

Sammys Treasurebox
04-17-2007, 11:38 AM
hello
which password do i use in publishing my web page.
hope to hear from you soon.
Hi Bradyx,
You use the password you got from BlueVoda when you bought your hosting package. You should have gotten an email with which ip address your site is on, login info, and client number. When I first tried to publish a page I kept putting in my password and couldn't figure out why it wouldn't work. Then my boyfriend told me I wasn't using the right ip address. So look in the email they sent you and look for what ip address your website is on. You'll need to enter that before you can publish the site. You need the ip address to log into your CPanel too. ^_^

Sammys Treasurebox
04-17-2007, 11:39 AM
Both are in the public_html folder. The page with the form is a html document. I saved the thank you page twice. Once as an html (on accident) and once as a php. From the tutorial I got the impression the thank you page was the php. Is it the other way around?

just bumping my post so you guys don't miss it ^_^

Andy128
04-17-2007, 08:26 PM
Sammy-
The page that contains the php script and the thank you message should be saved and published as - action with the php extension checked on the page properties. Therefore, when you look at the directory of the server there should be a page called - action.php

If you still can not get this worked out- you can (if you feel comfortable doing so) visit my website below and send me your user name and password and I will further assist you. But the above -coupled with the tutorial you got the info from, is all there is too it.

Andy

Sammys Treasurebox
04-17-2007, 11:04 PM
I saw the "contact us" button on your webpage but wasn't sure if I put in my info if just you would get it or if other people would get it too. My poor eyes can't seem to find the forum pm button on here. Can I email it to you?

navaldesign
04-18-2007, 05:36 AM
Sammy, it is really very simple.

You have created a form in a page and you have set the action of the form to be "action.php" . Up to this point, all is fine.

Now, this means that when someone submits from the form, the info will be sent in this "action.php" page.

So, create a simple page in BV, with a thank you message. Paste the php code that you have already posted above, in the page html code. It is not important if you paste it in the Start of Page, Between head, Inside Body, or even in the End of Page.

I usually prefer Start of page, as, if there is something wrong, this will prevent the display of the rest of the page. At least this will let the user (if you don't have any other warning code) know that something just didn't work.

A this point, goto to page properties, and set the extension of the page, when published, to be "php". Save the page as "action", publish it and you are done.

eastwynd
04-22-2007, 10:17 PM
so i have 2 different forms on my site, and I would like them to have different thank you pages. how do I accomplish this? whichever thankyou has been published last, is the one my site uses for both 'contact' and 'rsvp'. I have 2 folders within my BV folder. one each for contact (with its thank you page) and for rsvp (with its thank you page.) my site is www.cjlohrey.com (http://www.cjlohrey.com)
I was able to resolve my issue about error 404 with the previous posts helpful info.

navaldesign
04-22-2007, 10:42 PM
You can :

1. Use ABVFP to process your forms. ABVFP will allow for separate thankyou pages, autoresponders, customized emails and autoresponders for each and all forms, together with file uploads, files attached to the email, multiple choice dropdowns, mandatory fields, and security features.

2. If you still want to use the simple script of the tutorial, please note that it is NOT necessary to have the action page named "action", you can name it whatever you want. So, for your contact page, set the form action in "contact_action.php" (as example) and the other as "rsvp_action.php". This way you will have two separate thank you pages.

Also change your form Encoding type to Multipart / form Data

eastwynd
04-22-2007, 10:56 PM
thanks! that worked great.

Sammys Treasurebox
04-29-2007, 12:37 AM
Thank you Naval! I didn't save the page as "action" but I did now and it's working. Thank you everyone for your help. I greatly appreciate it.