Jump to content

i made a simple form, looking for advice on a newbie project to do.


silverglade

Recommended Posts

thank you. does that mail() tutorial let me plug in the information the user put in my form and send it to me? it looked like it only sent a pre defined message and mail to me. i dont know how to connect it to the submit button on my form. derek

 

You would use the posted vars from your form instead of the "pre-defined" vars in the manual example(s).  But yeah...I got to QFT Thorpe:

Sounds like you really need to learn some basics, theres a good free book (Hudzilla) in my signiture.

Link to comment
Share on other sites

Those links are intended to teach you the basics of PHP so that you know how to turn the 'predefined text' in the variables from the from.  If you go through the PHP tutorial at w3schools (already linked above) you will see how to make that predefined be the variables that you want to send.

Link to comment
Share on other sites

ok thanks very much i will try it.

i think its hard because the php tutorials and books dont teach you how to do everything, but teach you pieces of a puzzle, that you have to put together yourself. thats frustrating, but i guess i better get used to it. i have trouble if its not done for me already. but i guess i can try to do it.

thanks everyone for your help, i will try to make the form emailable. thanks. derek

 

Link to comment
Share on other sites

i think its hard because the php tutorials and books dont teach you how to do everything, but teach you pieces of a puzzle, that you have to put together yourself.

 

Generally this is why books are better in my opinion. Books are usually designed to be read from start to finnish and the introduce things in order. That way, by the time you finish the entire book, all the pieces fit.

Link to comment
Share on other sites

This also holds true of the w3schools PHP tutorial, if you read it start to finish then it gives you a good place to start.

Then you have to start using PHP to learn the basics.

 

i forgot, will it teach me how to link up the email function with my form button?

You have to set the action in the form to go to a php page that sends the email.

I wrote this quick.

<?php
$to = $_POST['email'];
$subject = "Subject";
$message = "My message";
if(!mail($to, $subject, $message))
{
   //sending the email failed
  //dont forget to redirect
}
//sending worked
//redirect
?>

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.