Submit button does not work. Please help!!!

SESeskiz

New Member
Hello Everyone.

I am working on a website for a client and everything seems perfect. There is just one problem with my form. The submit button doesnt do anything when click on it. It should send the information to the email or open an email client such as outlook express or Mail for Mac users. I have checked the form code and everything seems to be okay. I can not find any problems. Please help if you can.
 
Last edited:

ccowan

New Member
the action (action=" ") should be a page on your server that has a script which grabs all the fields info and then sends an email from that page.
 

SESeskiz

New Member
the action (action=" ") should be a page on your server that has a script which grabs all the fields info and then sends an email from that page.

the Action is action="mailto:emailaddress"
is this what u mean?

I want the info to go to that email.
 
Last edited:

ccowan

New Member
Right so what you do is change the "mailto:[email protected]" to "formsubmitpage.php" Then on that form submit page you need a script that grabs the info from the form and sends the mail. Here is a simple example of the form submit script to put on that page.

<?php

$username = ($_POST['username']);
mail( "[email protected]", "Contact Form Results", "Name: $username", "From: [email protected]" ) ;

?>
 

SESeskiz

New Member
Right so what you do is change the "mailto:email" to "formsubmitpage.php" Then on that form submit page you need a script that grabs the info from the form and sends the mail. Here is a simple example of the form submit script to put on that page.

<?php

$username = ($_POST['username']);
mail( "your email" , "Contact Form Results", "Name: $username", "From: [email protected]" ) ;

?>

I am not familiar with php. im a beginner. is there a simple way to do this?

I tested this one and it works
All i want is to click on the submit button and have the outlook open or the Mail on mac. I used the same code on this one and it worked.
 
Last edited:

ccowan

New Member
Well the best way to do these things is with PHP and the script I sent you is pretty simple. The way you are doing it works but it isn't very professional and the text that gets input in the email is hard to read. Would be better to just have a simple email link if your going for pure HTML. Once the email client opens they can edit all the text anyway so that voids any of the field checks you ran in the form rendering it pointless for the most part.
 

SESeskiz

New Member
I am not familiar with php. im a beginner. is there a simple way to do this?

I tested this one and it works
All i want is to click on the submit button and have the outlook open or the Mail on mac. I used the same code on this one and it worked.

ok thank you i'll try to play with the code you gave me. I just have one more question. This email do i have to change this email code you gave me in the exmaple "From: [email protected]" to my email?

Thank you very much for your help
 
Last edited:

ccowan

New Member
Yeah, that is the email address that will show up in the FROM field when the actual email is sent. Some servers require this to actually be an email set up with the domain, but on a lot of servers, this can be what you want it to be.
 

SESeskiz

New Member
yeah, that is the email address that will show up in the from field when the actual email is sent. Some servers require this to actually be an email set up with the domain, but on a lot of servers, this can be what you want it to be.

ok thank you. I'll try it now.
 
Top