PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 28th, 2000, 07:02 AM
Manfred Smol Manfred Smol is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 5 Manfred Smol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am new to scripting! can anybody tell me how to get a simple php script and an example of the form that works with this script.
Thanks very much in advance, Manfred from Breda, the Netherlands, Europe

------------------

Reply With Quote
  #2  
Old May 28th, 2000, 08:41 PM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
here i'm writing a small example.
edit it for your requirment


form.htm

<form method="post" action="formmail.php3">
Name : <input type="text" name="name"><br>
Email : <input type="text" name="email"><br>
<input type="submit" name="submit" value="submit"><br>
</form>

formail.php3

<?php

if($submit){
$message="Form Informations : n";
$message.="Name :$namen";
$message.="Email :$emailn";

mail("your@email.com","Feedback form",
$message,
"From : $emailn Reply-to: $email");

echo "Your feedback form has been successfully processedn";
}
?>

check it out php manual for an another example.

------------------
SR -
shiju.dreamcenter.net

"The fear of the LORD is the beginning of knowledge..."

Reply With Quote
  #3  
Old May 29th, 2000, 04:50 AM
Manfred Smol Manfred Smol is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 5 Manfred Smol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dear Shiju, Thanks very much for your coding! Wonderfull. I tried it out and it worked!

I tried to implement a little line in the script to check e-mail content in the email-field. This works allright, but not completely as it should work. The script returnstwo messages underneath wich don't make sence. Example: it say's "your E-mail is not correct" The same time it prints" Your feedback form has been successfully processed. Ther is a mistake in the script, I did something wrong! Do you know what is wrong?
Next question: If I want the script to email content of te textareafield, what coding do I use in the script? Many thanks in advance!

<html>
<head>
<title>message form</title>
</head>

<body text="black" link="blue" vlink="purple">
<div align="left">
<form method="post" action="formail.php3">
Name : <input type="text" name="name" size="24"><br>
Email : <input type="text" name="email" size="24"><br>
Remarks: <textarea name="vragen" cols="40" rows="8"></textarea><br>
<input type="submit" name="submit" value="submit"><br>
</form>
</div>
</body>

</html>

<?php
$back=0;
IF ($email=="") :
PRINT "<b>You did'nt fill in your E-mail-adress</b><BR><BR>";
$back="1";
ELSEIF (eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$email)==""):
PRINT "<b>Your E-mail adres is not correct!</b><BR><BR>";
$back="1";
ELSE: PRINT Click back to start over.<br><br>";
IF ($back==0 ):

if($submit){
$message="Form Informations : n";
$message.="Name :$namen";
$message.="Email :$emailn";

mail("user@email.com","Feedback form",
$message,
"From : $emailn Reply-to: $email");

echo "Your feedback form has been successfully processed.n";
}
?>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Where can I get a simple email and message-form & php.script?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap