Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 12:15:59 PM

Pages: 1 [2]   Go Down
  Print  
Author Topic: I need a simple email form script  (Read 635 times)
staticfiends.com
Spacescooter Operator
*****
Offline Offline

Posts: 32


WWW
« Reply #15 on: August 20, 2002, 05:24:00 AM »

thanks for the help....I don't know why either...

the first time you told me, I downloaded one from hotscripts but couldn't view the file with any program I had....but this time I think I found one that will work for me...I just need to modify it...thanks...I will let you know how it goes (especially if it doesn't work   "[brows]"   )

peace
Logged
stephan
Guest
« Reply #16 on: August 20, 2002, 05:24:00 PM »

Well, good luck!

I don't know why they don't work either.

Are you using notepad to edit the text?

Anyway, let us know how you get on!
Logged
TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #17 on: August 21, 2002, 01:53:00 PM »

Put the php right next to the question mark whenever you're opening some php code.  There is a space between the ? and the php on some of the tags, and I believe that's the problem.  I changed that in the code, and the error went away.  Also, capitalize Submit on the if statement.  Variables are case-sensitive, and the name of your submit button is "Submit", not "submit".
 
 [ August 21, 2002, 09:55 PM: Message edited by: TWebMan ]
Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #18 on: August 21, 2002, 02:00:00 PM »

Tell ya what...just use what's below.  It's the same code...had a couple of other mistakes I saw too.  You may want to replace the word Subject in the email with...ummm...a subject  "[color]"  
 
code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p><font face="High Tower Text" size="4"
><b>
<?php
if($Submit):
$to = "webmaster@staticfiends.com";
$from_header = "From: $Name <$Email>";
mail("$to","Subject","$Name\n$Address\n$Email\n$Comments","From: $from_header");
print ("<font face=Arial color=066CC>Thank you.<br>We will get back to you soon.</font>");
exit();
?>
<?php else: ?>
Please submit your information below: </b></font></p>
<form method="POST" action="<? echo ($PHP_SELF); ?>">
<b><font face="High Tower Text" size="4"> Your name:   <input type="text" name="Name" size="30">  <br>  Your url:   <input type="text" name="Address" size="30" value="http://">  * if applicable<br>  Your email:   <input type="text" name="Email" size="30">  <br>  Your comments:   <textarea name="Comments"></textarea>  <br>  <input type="submit" name="Submit" value="Send">  </font></b> </form>
<?php endif; ?>
<p><img src="/images/bob-cartoon-animation.gif" width="74" height="82"> </p>
</body>
</html>


 
 [ August 21, 2002, 10:30 PM: Message edited by: TWebMan ]
Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
staticfiends.com
Spacescooter Operator
*****
Offline Offline

Posts: 32


WWW
« Reply #19 on: August 22, 2002, 02:32:00 AM »

thank you...I used the code you posted...but it still gives me the same error ...???   "[fightclub]"
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to: