PHP email form thing |
PHP email form thing |
Aug 15 2009, 02:35 PM
Post
#1
|
|
![]() /人◕‿‿◕人\ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,283 Joined: Dec 2007 Member No: 602,927 |
CODE <?php if (isset($_REQUEST['email'])) { $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $message = $_REQUEST['message']; mail( "example@example.com", "Subject: $subject", $message, "From: $email" ); echo "Thank you."; } else { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='10' cols='40'> </textarea><br /> <input type='submit' /> </form>"; } ?> Someone with a brain for PHP, make sure I didn't mess that up anywhere. The issue is when I load it in IE, all I see is the source code. But when I refresh it, everything renders properly. |
|
|
|
![]() |
Aug 16 2009, 08:18 AM
Post
#2
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 2,648 Joined: Apr 2008 Member No: 639,265 |
Can you do multiline strings like that in PHP? I thought you had to use the HERE-doc syntax for multiline strings.
|
|
|
|
Buttsex PHP email form thing Aug 15 2009, 02:35 PM
elletricity I don't know The coding looks alright, and it... Aug 15 2009, 04:12 PM
jcp Post mailform.php
So I can check it over, and so ... Aug 15 2009, 06:12 PM
fixtatik QUOTE(jcp @ Aug 15 2009, 06:12 PM) Post m... Aug 16 2009, 12:31 PM
patokelley Are you using it in PHP or in an HTML site to hide... Aug 16 2009, 08:20 AM
Buttsex QUOTE(mipadi @ Aug 16 2009, 08:18 AM) Can... Aug 16 2009, 12:38 PM
fixtatik QUOTE(Buttsex @ Aug 16 2009, 12:38 PM) Ye... Aug 16 2009, 12:56 PM![]() ![]() |