Create a form request in website
|
| View previous topic :: View next topic |
| Author |
Message |
monnie
Joined: 14 Dec 2004 Posts: 9 Location: Lisboa
|
Posted: Thu Sep 22, 2005 3:28 pm Post subject: Create a form request in website |
|
|
Greetings
First of all i want to congratulate those who've create this useful help page.
Best regards
Now,
I'm making my webpage, witch is to be a business page, but i want to include on it a page where ppl can send to me some requests.
Such as like things to order, or simple tips.
I'm using publisher 2003, and when i try to build the form request something appears to tell me that i have to check if my isp can manage with some extensions...
Is there a way to pass this stuff??
How can i recieve that data??
It could be as an email or even, as i most want it, as a get data on page??
hope you can help me...
Thanks
monnie |
|
| Back to top |
|
 |
|
|
Protege 50+ Club
Joined: 19 Sep 2005 Posts: 68 Location: Scotland
|
Posted: Thu Sep 22, 2005 3:40 pm Post subject: Re: Create a form request in website |
|
|
| Code: |
<form action="<?=$PHP_SELF?>" method="post">
Your Email: <input type="text" name="email" size="20" /><br />
Subject: <input type="text" name="subject" size="20" /><br />
Message: <textarea rows=5 cols=30 name="message"></textarea><br />
<input type="submit" name="submit" value="Contact Me!" />
<?
if(isset($_POST['submit']))
{
$email = $_POST['email'];
$to = "your@email.com";
$subject = $_POST['subject'];
$message = str_replace(array("\\","Content-Type:","bcc:","cc:","MIME-Version:",
"Content-Transfer-Encoding:","%"),"",$_POST['message']);
mail($to, $subject, $message, "From: $email\n");
echo "Thanks";
}
?>
|
Always recycle kids!
Use the above to get an email of the form data. Save it as whatever.php and change your@email.com to your email. Hope it helps you. |
|
| Back to top |
|
 |
monnie
Joined: 14 Dec 2004 Posts: 9 Location: Lisboa
|
Posted: Thu Sep 22, 2005 3:57 pm Post subject: Thanks |
|
|
xi...man..thanks for the quick reply
But, where do i put this stuff??
On the page where i have to text boxs, buttons, etc or in a blank page?
And, in there, where to?? Head, body???
Sorry, i'm newbie
Best of luck
monnie |
|
| Back to top |
|
 |
Protege 50+ Club
Joined: 19 Sep 2005 Posts: 68 Location: Scotland
|
Posted: Thu Sep 22, 2005 4:33 pm Post subject: Re: Create a form request in website |
|
|
Put the code I posted in the body of your page. if you have made a form already, and you'd like to use that one rather than then one I posted - post it up and I'll change the PHP so it works with your form.
If you're happy with the form I posted just copy the code and paste the form & php where you want the form to go on your page. And it should work for you.  |
|
| Back to top |
|
 |
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|