Hi all,
I need to know how to use the mail() function to send form textboxs to me.
I have a contact.htm which contains...
<body>
<form action="mail.php" method="get">
<INPUT maxLength=80 size=40 name="textbox">
<INPUT maxLength=80 size=40 name="textbox1">
<INPUT type=submit value=Submit name=submit>
<INPUT type=reset value=Clear name=clear>
</form>
</body>
and a php file called mail.php which contains...
<?php
$to = "[email protected]";
$subject = "Email Test";
$message = $_POST['textbox'];
$message .= $_POST['textbox2'];
mail($to,$subject,$message);
?>
thats all I got do I need anything else?
where do I put these files on the websever?
in puplic html?
or where?
Thanks,
Mikethese go in public_html, as public_html is the root folder that people can view on the browser, I have on question though, why do you have two textboxes, why not just have one and make it twice the size?I have on question though, why do you have two textboxes, why not just have one and make it twice the size?
well this is just to get me started once I know how to then I will have many texboxs and drop down lists ... but first I just want to know the basic...yes tha tshould work but, you need to have the type in those inputs
<INPUT type="text" maxLength=80 size=40 name="textbox">
I need to know how to use the mail() function to send form textboxs to me.
I have a contact.htm which contains...
<body>
<form action="mail.php" method="get">
<INPUT maxLength=80 size=40 name="textbox">
<INPUT maxLength=80 size=40 name="textbox1">
<INPUT type=submit value=Submit name=submit>
<INPUT type=reset value=Clear name=clear>
</form>
</body>
and a php file called mail.php which contains...
<?php
$to = "[email protected]";
$subject = "Email Test";
$message = $_POST['textbox'];
$message .= $_POST['textbox2'];
mail($to,$subject,$message);
?>
thats all I got do I need anything else?
where do I put these files on the websever?
in puplic html?
or where?
Thanks,
Mikethese go in public_html, as public_html is the root folder that people can view on the browser, I have on question though, why do you have two textboxes, why not just have one and make it twice the size?I have on question though, why do you have two textboxes, why not just have one and make it twice the size?
well this is just to get me started once I know how to then I will have many texboxs and drop down lists ... but first I just want to know the basic...yes tha tshould work but, you need to have the type in those inputs
<INPUT type="text" maxLength=80 size=40 name="textbox">