Jump to content

FORM HELP !!!


film

Recommended Posts

Hi ... I was wondering how to make a form either

1)Send the information inputted to another file (so i can view what the inputted and will be a type of list)

2)E-mail me it BUT so it doesnt have to open up outlook

<html>

<head>

</head>

<body>

<FORM METHOD="POST" ACTION="mailto:My email address">

<INPUT TYPE="text" NAME="name" SIZE="30">

<INPUT TYPE="submit">

<INPUT TYPE="reset">

</body>

</html>

Link to comment
Share on other sites

If your server supports PHP, you could try this...

Make your page as you have, but change the action to this:

&lt;FORM METHOD="POST" ACTION="send_mail.php"&gt;

Then create and upload this page, called send_mail.php:

$name = strip_tags($name);   

   

$sendto = "you@youremail";   

$subject = "Website contact form";   

$message = "$name"; 

$from = "From: you@youremail";  

     

mail($sendto, $subject, $message, $from);



$next_page = "index.html";

header("Location: $next_page");

That will send an email from your own email, to your own email with the $name variable, which was grabbed from your form. Then it will redirect back to your index page, or whatever you want.

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...