MULTIPLE PAGE contact form - email problem

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
macek
php-forum Active User
php-forum Active User
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am
Contact:

Sun Sep 19, 2010 12:23 am

You don't submit FORM on the first page!

Code: Select all

<form method="post" action="contact2.php">
Name:<br /><input name="name" type="text" size="30" maxlength="40" /><br /><br />
Email:<br /><input name="email" type="text" size="30" maxlength="40" /><br /><br />

<input type="reset" value="Reset" />&nbsp; [color=#BF0000]<a href="contact2.php">next</a>[/color]
</form>

Code: Select all

<form method="post" action="contact2.php">
Name:<br /><input name="name" type="text" size="30" maxlength="40" /><br /><br />
Email:<br /><input name="email" type="text" size="30" maxlength="40" /><br /><br />

<input type="reset" value="Reset" />&nbsp; [color=#004000][b]<input type="submit" value="Next" />[/b][/color]
</form>
And I suggest to save variables from the first page to SESSION instead of include it to HIDDEN input - skilled users can change HIDDEN INPUTs :D

User avatar
macek
php-forum Active User
php-forum Active User
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am
Contact:

Mon Sep 20, 2010 7:32 am

Where did U call some function to send email??

http://php.net/manual/en/function.mail.php

User avatar
macek
php-forum Active User
php-forum Active User
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am
Contact:

Mon Sep 20, 2010 8:09 am

But you must call function to send mail! How PHP can know that you want to send email without tell it to PHP? AI? :D

Code: Select all

$message = "Line 1\nLine 2\nLine 3";

mail('info@example.com', 'My Subject', $message);

User avatar
macek
php-forum Active User
php-forum Active User
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am
Contact:

Sun Sep 26, 2010 4:33 am

Code: Select all


mail($_POST['email'], ,.... );


Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests