It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming HTML Forum

Create a form request in website

Create a form request in website

Postby monnie on Thu Sep 22, 2005 3:28 pm

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
Kyo Dake Wa Hito Ni Shinsetsu Ni
monnie
 
Posts: 9
Joined: Tue Dec 14, 2004 1:35 pm
Location: Lisboa

Postby Protege on Thu Sep 22, 2005 3:40 pm

Code: Select all
<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.
Docendo discimus.
Protege
50+ Club
 
Posts: 67
Joined: Mon Sep 19, 2005 9:05 am
Location: Scotland

Thanks

Postby monnie on Thu Sep 22, 2005 3:57 pm

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
Kyo Dake Wa Hito Ni Shinsetsu Ni
monnie
 
Posts: 9
Joined: Tue Dec 14, 2004 1:35 pm
Location: Lisboa

Postby Protege on Thu Sep 22, 2005 4:33 pm

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. :)
Docendo discimus.
Protege
50+ Club
 
Posts: 67
Joined: Mon Sep 19, 2005 9:05 am
Location: Scotland


Return to HTML Forum

Who is online

Users browsing this forum: No registered users and 4 guests