Jump to content

Contact US Form problem... help please


ohmto

Recommended Posts

i have a problem i am a designer but i know little about coding ... any way the prblem is in php form which refering to email not to database ... some friend gave me a contact us form he was made b4 and i redesigned it but after i almost finished i tried it but i found it doesn't work and i don't know ahy ?

 

i feel that the problem is some mistakes in hmtdesigns.php file

 

the live example you can see it here

http://www.meca-club.com/2008/app.html

 

please help

 

the html code is

<iframe name="I1"  frameborder="0" src="form.php" width="660" height="400" style="overflow: auto; border:1px solid #f2f2f2; ">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>

 

the form.php code :

<?

include ('config.php');

?>

<h2>Application Form</h2>

<form action="hmtdesigns.php" method="post" id="appform">
<table id="apptable1">
<tr>
<td class="tdapp1"><label>Name:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><input name="name" type="text" /></td>
</tr>

<tr>
<td class="tdapp1"><label>Phone:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><input name="phone" type="text" /></td>
</tr>

<tr>
<td class="tdapp1"><label>Email:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><input name="email" type="text" /></td>
</tr>

<tr>
<td class="tdapp1"><label>1st preference:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td>
  <select name="fristPrefrence" tabindex="1" >
  <option>Select ----</option>
    <option value="EPR and FR">EPR and FR</option>
<option value="IPR and Reception">IPR and Reception</option>
<option value="Logistics and Facilities">Logistics and Facilities</option>
<option value="HR">HR</option>
<option value="Media and IT">Media and IT</option>
  </select>
  </td>
</tr>

<tr>
<td class="tdapp1"><label>2nd preference:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td>
<select name="secoundPrefrence" tabindex="1">
	<option>Select ----</option>
		<option value="EPR and FR">EPR and FR</option>
		<option value="IPR and Reception">IPR and Reception</option>
		<option value="Logistics and Facilities">Logistics and Facilities</option>
		<option value="HR">HR</option>
		<option value="Media and IT">Media and IT</option>
	</select>
  </td>
</tr>

<tr>
<td class="tdapp1"><label>Are you flexible in any of the two preferences ?</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td>
<input name="flexibility" type="radio" value="yes" checked="checked" />Yes
 
<input name="flexibility" type="radio" value="no" />No</td>
</tr>

<tr>
<td class="tdapp1"><label>Previous Experience/Trainings:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><textarea name="PreExperTrain" cols="30" rows="4" onselect="if(this.value=='Type your Previous Experience orTrainings or both')this.value='';" >Type your Previous Experience or Trainings or both</textarea></td>
</tr>

<tr>
<td class="tdapp1"><label>Extracurricular activities:</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><textarea name="Extraactis" cols="30" rows="4"  onselect="if(this.value=='Type  your Extracurricular activities')this.value='';">Type  your Extracurricular activities</textarea></td>
</tr>
<tr>
<td class="tdapp1"><label>What does the phrase "Counting the Beans" mean ?</label></td>
<td width="4" style="color:#FF0000;">*</td>
<td><textarea name="beansques" cols="30" rows="4" onselect="if(this.value=='just answer')this.value='';" >just answer</textarea></td>
</tr>

</table>
</td>
</tr>
<tr>
<td class="tdapp1"></td>
</tr>
<tr>
<td align="left">
<input type="submit" name="submit" value="Send" tabindex="2" />
<input type="reset" value="Reset" name="delete" /></td>
</tr>
</table>
</form>


<br />
</center>

 

the hmtdesigns.php code :

<?

include ('config.php');

?>

<?

$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$fristPrefrence = $_POST['fristPrefrence'];
$secoundPrefrence = $_POST['secoundPrefrence'];
$flexibility = $_POST['flexibility'];
$PreExperTrain = $_POST['PreExperTrain'];
$Extraactis = $_POST['Extraactis'];
$beansques = $_POST['beansques'];
$interview = $_POST['interview'];

$mssg ="

-------------------------------------------------------------------------------------------------------------------
This is my informations that you guide me to fill in the application form ....
-------------------------------------------------------------------------------------------------------------------

My Name:

$name

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

My phone:

$phone

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

My Email:

$email

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

My 1st Prefrence:

$fristPrefrence

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

MY 2nd Prefrence:

$secoundPrefrence

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

Are you flexible in any of the two prefrences

$flexibility

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

Previous Experience/Trainings:

$PreExperTrain

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

Extracurricular activities:

$Extraactis

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

What does the phrase “Counting the Beans” mean

$beansques

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

My suitable interview oppointment:

$interview

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

My IP address:
$ip
Port:
$potr

We use this IP address number just to sure from the sender info..
-------------------------------------------------------------------------------------------------------------------
www.meca-club.com                                                IT team
-------------------------------------------------------------------------------------------------------------------


";

if (!$name OR !$phone OR !$email OR !$fristPrefrence OR !$secoundPrefrence OR !$flexibility OR !$PreExperTrain OR !$Extraactis OR !$beansques OR !$interview){

echo"


<table border='0' style='border-collapse: collapse' >
<tr>
	<td style='padding-left:20px;'>

			<legend align='left'><font face='Tahoma' style='font-size: 11px'>May be you miss some thing to fill</font></legend>
			<form method='post'  action='form.php'>
				<table border='0' cellspacing='0' cellpadding='2'  style='font-size: 12px;'>
							<tr>
									<td align='left' colspan='2'>please check the following fields:</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Your Name</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Your Phone Number</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>You E-mail</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>1st Prefrence</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>2nd Prefrence</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Q. Are you flexible in any of the two prefrences ?</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Your Previous Experience/Trainings</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Your Extracurricular activities</td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Q. What does the phrase “Counting the Beans” mean ? </td>
							</tr>
							<tr>
									<td width='13'><font color='#FF0000'>*</font></td>
									<td align='left'>Your suitable interview oppointment</td>
							</tr>
				</table>
			</form>
	</td>
</tr>
</table>
<center>[ <a href='javascript:history.go(-1)'>Back</a> ]</center><br>

";

}else{

mail ($to,$sup,$mssg," From: $name <$email>") ;

echo"

<table border='0' style='border-collapse: collapse; width='100%' id='table1'>
<tr>
	<td width='25%' align='50%'> </td>
	<td align='center'>
		<legend align='left'>
		<font face='Tahoma' style='font-size: 15px'>Thank you but Wait for the approvment on the interview time</font></legend>
			<form method='post' action='form.php'>
				<div align='left'>
					<center>
						<table border=0 cellspacing=0 cellpadding=2 bordercolor=#111111 width='241'>
							<tr>
								<td align='left'>
								<p align='justify'>
								The message sent .. Thank you <font color='#FF0000'>$name</font> 
								Thanks again for your Message and as soon as possible i will reply
								</td>
							</tr>
						</table>
					</center>
				</div>
			</form>
		</td>
	<td align='center' width='22%'> </td>
</tr>
</table>
<center>[ <a href='javascript:history.go(-1)'>Back</a> ]</center>

";

}


?>

 

the config.php code :


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
background: #FFF;
font-family:Tahoma, Arial, Helvetica;
font-size:12px;
text-align:left;
scrollbar-3dlight-color: #555555;    
scrollbar-track-color: #e5e5e5;    
scrollbar-shadow-color: #555555;    
scrollbar-face-color: #555555;	
scrollbar-arrow-color: #555555;	
scrollbar-darkShadow-color: #555555;
}
thead td{ background: #e5e5e5; font-weight:bold; text-align:center;font-size:12px;}
tbody tr.raw1{ background: #f2f2f2; font-weight:normal; text-align:center;font-size:12px;}
tbody{ font-weight:normal; text-align:center;font-size:12px;}
label{ font-size:12px; color:#FF9900;font-size:12px;}
#appform{font-size:12px;}
#apptable1 td{ text-align:left;}
.tdapp1{ width:200px; text-align:left;}
.timeback{ background:#fbfbfb; font-size:15px; font-weight:bold; border-right:1px solid #ccc; }
.appway li{list-style: decimal;font-size:12px;}
h2{ padding-bottom:5px; border-bottom:1px solid #CC9900; color: #FF9900; width:400px;}
a img{ border:none;}
.textat{ padding:15px;}
</style>

<?

$to = "ohmto@hotmail.com";
$sup = "$email";
$nem = "$name";
$ip = getenv ("REMOTE_ADDR");
$potr = getenv ("REMOTE_PORT");

?>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.