fname,last name, add, insurance, DOB, height, weight, a calculator that calculates bodymassindex (BMI) based on height and weight, any other comments. i searched around and im completely dumbfounded on what to do~! i searched PHP and still not sure on what to do. I am not sure if the clinic has already purchased a server that has is a php server but anyway im lost can anyone please help.
emailing from website
#1
Posted 20 November 2005 - 08:13 PM
fname,last name, add, insurance, DOB, height, weight, a calculator that calculates bodymassindex (BMI) based on height and weight, any other comments. i searched around and im completely dumbfounded on what to do~! i searched PHP and still not sure on what to do. I am not sure if the clinic has already purchased a server that has is a php server but anyway im lost can anyone please help.
#2
Posted 20 November 2005 - 08:55 PM
php is one way to do it or you can also use cgi.
To try cgi formmail, you will have to download the formmail script from matt's script archive.
http://www.scriptarc...=formmail&c=zip
extract the file then upload the formmail.pl to your site.....for example yoursite.com/cgi/formmail.pl
then you will have to enter some code onto a new website....
the following code will submit a users name,insurance, DOB, height and weight . copy and paste the following code into notepad.
<!--- start form mail code --->
<table cellpadding="0" cellspacing="0" border="0"
bgcolor="ffffff" width="100%">
<form method="POST" action="yoursite.com/cgi/formmail.pl">
<input type=hidden name="recipient" value="[email protected]">
<input type=hidden name="redirect" value="website to go after submit email">
<input type=hidden name="print_config" value="name,insurance,DOB,height,weight">
<input type=hidden name="print_blank_fields" value="1">
<tr>
<td width="20"> </td>
<td width="75" align="right"
valign="top">Name:</td>
<td width="455" align="left">
<input type=text name="name" style="background:f9f9f9"
</td>
</tr>
<tr>
<td width="20"> </td>
<td width="75" align="right" valign="top">Insurance:</td>
<td width="455" align="left"> <input type=text name="insurance"></td>
</tr>
<tr>
<td width="20"> </td>
<td width="75" align="right" valign="top">DOB:</td>
<td width="455" align="left"> <input type=text name="DOB"></td>
</tr>
<tr>
<td width="20"> </td>
<td width="75" align="right" valign="top">Height:</td>
<td width="455" align="left"> <input type=text name="height"></td>
</tr>
<tr>
<td width="20"> </td>
<td width="75" align="right" valign="top">Weight:</td>
<td width="455" align="left"> <input type=text name="weight"></td>
</tr>
<tr>
<td width="20"> </td>
<td width="75" align="right" valign="top"> </tr>
<tr>
<td width="20"> </td>
<td width="50" align="right"> </td>
<td width="480" align="left" colspan="2">
<input type="submit" value="submit"></td>
</tr>
</form>
</table>
<!--- end form mail code --->
change the bold letters to adhere to your site or email address.
sorry if it looks mumbo jumbo but after you are finished, save the file as "contact.html" or whatever you desire, then upload it to your site.
you can find a good php formmail here:
http://www.kirupa.co...ontact_form.htm
gl and let me know if you have any questions,
ditto
Edited by ditto, 20 November 2005 - 08:56 PM.
#3
Posted 21 November 2005 - 02:01 AM
html(contacts.html)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>New Reflections - Contact Us</title>
</head>
<body>
<div id="body" style="position:absolute; left:2px; top:1px; width:640; height:985px; z-index:1; background: url(bg.jpg); layer-background-image: url(bg.jpg); border: 1px none #000000;">
<form name="form1" method="post" action="mailer.php">
<p>First Name
<input name="fname" type="text" id="fname" size="20">
Last Name
<input name="lname" type="text" id="lname">
<br>
Email Address
<input name="email" type="text" id="email">
<br>
Age
<input name="age" type="text" size="5">
Date of Birth
<input name="month" type="text" size="5" maxlength="2">
/
<input name="day" type="text" size="5" maxlength="2">
/
<input name="year" type="text" size="5" maxlength="4">
<br>
Insurance:
<input name="insurance" type="text" size="50" maxlength="50 ">
<br>
<label>
<input type="radio" name="referrral" value="radio">
HMO</label>
<label>
<input type="radio" name="referrral" value="radio">
PPO</label>
<br>
<br>
Height:
<input name="height_feet" type="text" size="3" maxlength="2">
feet,
<input name="height_inches" type="text" size="3" maxlength="2">
inches<br>
BMI
<input name="bmi" type="text" size="5" maxlength="2">
</p>
<p>Where did you hear about New Reflections?<br>
<select name="referral">
<option>Surfing the Web</option>
<option>Saw the commercial</option>
<option>Newspaper/ Magazine Article</option>
<option>Someone Referred me</option>
<option>Other</option>
</select>
</p>
<p>Message to New Reflections<br>
<textarea name="message" cols="50"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</div>
</body>
</html>
And heres the mailer.php file
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "NR Website Referral";
$fname_field = $_POST['fname'];
$age_field = $_POST['age'];
$day_field = $_POST['day'];
$month_field = $_POST['month'];
$year_field = $_POST['year'];
$insurance_field = $_POST['insurance'];
$type_field = $_POST['radio'];
$feet_field = $_POST['feet'];
$inches_field = $_POST['inches'];
$BMI_field = $_POST['BMI'];
$referral_field = $_POST['referral'];
$lname_field = $_POST['lname'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: \n First: $fname_field\n Last: lname_field\n E-Mail: $email_field\n Age: $age \n
DOB: $monthfield \ $day_field \ $year_field \n Insurance: $insurance_field \n Type: $type_field \n
Height: $feet_field , $inches_field \n BMI: $BMI_field \n Referral : $referral_field \n Message:\n $message"; 0
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "Error : Data was not sent. Please fill EVERYTHING out again!";
}
?>
</body>
</html>
#4
Posted 21 November 2005 - 07:04 AM
#5
Posted 21 November 2005 - 11:50 AM
You just link your form to go to the php file, and the php file will process it for you!
But, you may need someone here to help you make a php file if you don't know php well.
#6
Posted 21 November 2005 - 03:43 PM
Thats an awesome website and you don't have to do anything except copy and paste their code!
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users