acamela's Avatar
acamela 3
5 Asked
39 Answered
11 Best
0
No one has voted on this question yet :(
2 years, 11 months ago

My iWeb php form won't submit. How can I fix it?

Alright, so I have an iWeb site with an html based form integrated into a page. I have the form action being a submit to process.php file. That process.php file commands the form data to be emailed to my email address. I also made the process.php file submit the info to an online file. Both of those tries were unsuccessful in that while process.php came up for 5 seconds and then redirected, like it was supposed to, but when I checked the file and my email address, the form submission was not emailed nor was it posted to the online file.

Alternatively, when I uploaded the form as an html page by itself and the process.php file onto a different server, they worked perfectly fine and the information both email and submitted to the online file. How can I make this work in iWeb??? I was thinking that it was permissions, but that would not make any sense.

If you would like to try it out, go to
http://www.briancrowellpro.com/GreenwichArts/Artist_Applications.html
then fill out the form and submit it. The process.php will come up saying that the form has been submitted fine, but it really did not submit. How can I fix this???

Here is the process.php file code:

Untitled Document if ($_SERVER'REQUEST_METHOD' == 'POST') {
$firstname = $_POST'firstname' ;
$lastname = $_POST'lastname' ;
$address = $_POST'address' ;
$phone = $_POST'phone' ;
$email = $_POST'email' ;
$references = $_POST'references' ;
$training = $_POST'training' ;
$workdesc = $_POST'workdesc' ;
$prevexib = $_POST'prevexib' ;
$comments = $_POST'comments' ;
}
mail ( "acamela@gmail.com, tatianam@greenwicharts.org", "Artist Submission", "
First Name: $firstname
Last Name: $lastname
Address: $address
Phone: $phone
Email: $email
References: $references
Training: $training
Work Description: $workdesc
Previous Exibitions: $prevexib
Comments: $comments", "From: $email" )

?>

Your application has been successfully submitted.

We will contact you once we have reviewed your information.

Redirecting to home page in 5 seconds.

Tip for best answer: M$5.00
Separate topics with commas, or by pressing return. Use the delete or backspace key to edit or remove existing topics.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

What is Your Answer?

0
0
0

7 Answers

0
robbrown's Avatar
robbrown | 2 years, 11 months ago
4
I think that your hosting company has disabled sending mail this way.

Forms like this could be hijacked by spammers for their own evil purposes.

You need to add some extra code to process.php that will authenticate against your email address against your email (smtp) server and send mail through there.

Here is the code to do it:
http://www.codewalkers.com/c/a/Email-Code/Smtp-Auth-Email-Script/

I'm sorry that I couldn't give you a "replace this and it will work" answer, however, spam is a pretty serious problem and hosting companies know that spammers are constantly on the lookout for forms like this one.

I hope that this helps you solve your problem acamela!

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
ptanham's Avatar
ptanham | 2 years, 11 months ago
3
You don't have an ; after the mail function. - mail (); ?>

So it should be:

mail ( "acamela@gmail.com, tatianam@greenwicharts.org", "Artist Submission", "
First Name: $firstname
Last Name: $lastname
Address: $address
Phone: $phone
Email: $email
References: $references
Training: $training
Work Description: $workdesc
Previous Exibitions: $prevexib
Comments: $comments", "From: $email" );

?>

As for the sever bit, maybe you could try upload the iweb files to the different server?

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
jason45's Avatar
jason45 | 2 years, 1 month ago
2
It is simple job. You can do it yourself. Just learn more about form builder.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
warpedspeed's Avatar
warpedspeed | 2 years, 11 months ago
3
Hey, a quick tip for you that I use constantly.

Using extract will turn the array into local named variables -- so you don;t have to manually assign them. Its saves a ton of time and work.

So rather than:

code

$bleh=$_POST"bleh";
$foo=$_POST"foo";

/code

just do:

code

extract($_POST);

/code

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
truth7's Avatar
truth7 | 2 years, 11 months ago
3
Check your file permissions

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
onek's Avatar
onek | 2 years, 11 months ago
3
I won't pretend to be an expert on PHP form processing. But I would like to leave this link, that explains how to do a form in PHP in simples lessons, hope it helps:

http://apptools.com/phptools/forms/

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
davepamn's Avatar
davepamn | 2 years, 11 months ago
0
Use a server site smtp server call. You can get a php code for the email .

I use smtp for sending emails using asp.net
source(s):
asp.net

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel

Learn something new with our FREE educational apps!

Private lessons in the comfort of your own home. Get back in shape or finally pick up a guitar with our great experts guiding you the whole way!
Learn Guitar
Learn Hip Hop
Learn Pilates