

| | #1 (permalink) |
| Name: Andrew Last Online: Yesterday 01:48 PM iTrader: (104) Join Date: Feb 2006
Posts: 2,818
DNF$: 554 Location: Canada
Country: | Sendmail.php help I am building a simple contact form and wondering if i could get some help. I want it to be a series of questions form.html <form method="post" action="sendmail.php"> Name: <input name="name" type="text" /><br /> Email Address: <input name="email" type="text" /><br /> Question 1:<br /> <textarea name="q1" rows="15" cols="40"> </textarea><br /> Question 2:<br /> <textarea name="q2 rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> what does the sendmail.php have to look like i am having trouble getting this to work. i have tried a few things. <?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $q1 = $_REQUEST['q1'] ; $q2 = $_REQUEST['q2'] ; mail( "my@emailaddress.com", "Feedback Form", $message, "From: $email" ); ?> Thanks in advance
__________________ Alternative Energy / Green / Eco Domain Sale! |
| | |
| Sponsored Ads |
| | #2 (permalink) |
| .scot Name: Finbarr Taylor Last Online: 11-11-2009 07:46 AM iTrader: (4) Join Date: Apr 2008
Posts: 468
DNF$: 4,244 Location: Glasgow
Country: | Your form method is "post". This means that all data passed by the form to sendmail.php will be in the $_POST array. Try Code: $name = $_POST['name'];
__________________ GlasgowSEO.com is on auction on Sedo! Rank 2 on Google for 'glasgow seo'. CPC £3.35/$5.31. High advertiser competition. Glasgow is Scotland's largest city with over 1,000,000 inhabitants. |
| | |
| | #3 (permalink) | |
| Name: Andrew Last Online: Yesterday 01:48 PM iTrader: (104) Join Date: Feb 2006
Posts: 2,818
DNF$: 554 Location: Canada
Country: | Quote:
Thanks, i will give that a shot. this form will be in a protected area of a website with a few trusted people having access. Thanks,
__________________ Alternative Energy / Green / Eco Domain Sale! | |
| | |
| | #4 (permalink) |
| .scot Name: Finbarr Taylor Last Online: 11-11-2009 07:46 AM iTrader: (4) Join Date: Apr 2008
Posts: 468
DNF$: 4,244 Location: Glasgow
Country: | Feel free to PM me with any other PHP (and web tech) related questions - I'd be happy to help.
__________________ GlasgowSEO.com is on auction on Sedo! Rank 2 on Google for 'glasgow seo'. CPC £3.35/$5.31. High advertiser competition. Glasgow is Scotland's largest city with over 1,000,000 inhabitants. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |