CPQIS
03-07-2004, 03:34 PM
Hey I made this form, and please know that I have no idea what I'm doing when it comes to php!!!
I didn't know if the mail to part of it goes before or after the form, so I put it on both... When I click submit, it sends to my email, but the form is not sent. Also, how would I make it so it says who it's from? I mean, like for the email field, how do I make it show up as from "email field"... Did I loose you?
Here's the form I have. If you respond, please respond in detail and try not to confuse me with all the php terms!!!
<?php
if ($_POST['form']) { //process the data
$from = $_POST['Free Signup'].' <'.$_POST['email'].'>';
mail ("coryp@cpqservices.com",$subject, $message, "From: $from");
?>
Your website will be activated within 48hrs. Your account details will be mailed to the email address you provided.
<?php
} else { //get the data
?></p><?php echo $PHP_SELF; ?>
<form method="POST">
<div align="left">
<p>
<input type="hidden" name="form" value="1">
<br>
<span class="style2">*Full Name:</span>
<input type="text" name="textfield">
*Email Address:
<input type="text" name="textfield2">
</p>
<p>*Username:
<input type="text" name="textfield3">
*Password:
<input type="password" name="textfield4">
</p>
<p>*Website Name:
<input name="textfield5" type="text" value=".cpqservices.com">
Phone Number:
<input type="text" name="textfield6">
</p>
<p>How did you hear of us?
<select name="select">
<option>Search Engine</option>
<option>Forum</option>
<option>A friend</option>
<option>I followed a link</option>
<option>Other</option>
</select>
<br>
</p>
</div>
<button type="submit" name="submit">SIGN UP! </button>
</form><?php
if ($_POST['form']) { //process the data
$from = $_POST['Free Signup'].' <'.$_POST['email'].'>';
mail ("coryp@cpqservices.com",$subject, $message, "From: $from");
?>
Your website will be activated within 48hrs. Your account details will be mailed to the email address you provided.
<?php
} else { //get the data
?>
It's for free hosting, and I think someone sent me a signup, and if your reading this, I didn't reply because of form problems!
I didn't know if the mail to part of it goes before or after the form, so I put it on both... When I click submit, it sends to my email, but the form is not sent. Also, how would I make it so it says who it's from? I mean, like for the email field, how do I make it show up as from "email field"... Did I loose you?
Here's the form I have. If you respond, please respond in detail and try not to confuse me with all the php terms!!!
<?php
if ($_POST['form']) { //process the data
$from = $_POST['Free Signup'].' <'.$_POST['email'].'>';
mail ("coryp@cpqservices.com",$subject, $message, "From: $from");
?>
Your website will be activated within 48hrs. Your account details will be mailed to the email address you provided.
<?php
} else { //get the data
?></p><?php echo $PHP_SELF; ?>
<form method="POST">
<div align="left">
<p>
<input type="hidden" name="form" value="1">
<br>
<span class="style2">*Full Name:</span>
<input type="text" name="textfield">
*Email Address:
<input type="text" name="textfield2">
</p>
<p>*Username:
<input type="text" name="textfield3">
*Password:
<input type="password" name="textfield4">
</p>
<p>*Website Name:
<input name="textfield5" type="text" value=".cpqservices.com">
Phone Number:
<input type="text" name="textfield6">
</p>
<p>How did you hear of us?
<select name="select">
<option>Search Engine</option>
<option>Forum</option>
<option>A friend</option>
<option>I followed a link</option>
<option>Other</option>
</select>
<br>
</p>
</div>
<button type="submit" name="submit">SIGN UP! </button>
</form><?php
if ($_POST['form']) { //process the data
$from = $_POST['Free Signup'].' <'.$_POST['email'].'>';
mail ("coryp@cpqservices.com",$subject, $message, "From: $from");
?>
Your website will be activated within 48hrs. Your account details will be mailed to the email address you provided.
<?php
} else { //get the data
?>
It's for free hosting, and I think someone sent me a signup, and if your reading this, I didn't reply because of form problems!
