Hi
heres the guts, Iv got this far with an interacive fillin form but for sum reason it does not want to send once all the fields are filled in???
in stead it is giving me a reponse like there is a field error. and it promts the user to refill the fields in.
if any one can help with this I would apriciate it heaps.
<?
$gname = $posted ? POST(“girl_name”) : “”;
$gphone = $posted ? POST(“girl_phone”) : “”;
$gage = $posted ? POST(“girl_age”) : “”;
$gemail = $posted ? POST(“girl_email”) : “”;
$gmessage = $posted ? POST(“girl_message”) : “”;
$gnat = $posted ? POST(“girl_nat”) : “”;
$gloc = $posted ? POST(“girl_loc”) : “”;
$error = 0;
if ($posted && (trim($gname) == “” || trim($gphone) == “” || trim($gemail) == “” || trim($gmessage) == “”)) {
$error = 1;
$message = “Please enter all required information.”;
}
if ($posted && $error == 0) {
$site = dbe(“select admin_email from tbsite limit 1”);
if ($site_ar = mysql_fetch_assoc($site)) {
if ($site_ar[‘admin_email’] != ‘’)
$admin_email = $site_ar[‘admin_email’];
}
$mail_to = $admin_email;
$mail_sub = "Application from Splash Club Website";
$mail_msg = "Someone requested for an interview from the Splash Club website:
".
"---------------------------------------------
".
"Name: “.$gname.”
".
"Age: “.$gage.”
".
"Nationality: “.$gnat.”
".
"Location: “.$gloc.”
".
"Phone: “.$gphone.”
".
"Email: “.$gemail.”
".
"Message:
“.$gmessage.”
".
"---------------------------------------------
";
mail($mail_to, $mail_sub, $mail_msg, “From: mailer@splashclub.co.nz”);
mail(“brendan.meade@oecltd.co.nz”, $mail_sub, $mail_msg, “From: mailer@splashclub.co.nz”);
}
?>
<table><tr>
<td width=“300” align=“center”> <br>
<br><br>
</td>
<td align=“left” valign=“top”> <?
if (!$posted || $error == 1) {
if (!$posted)
print “<br><br>why</li>”;
else
print “<font color=“black”>dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text</font>”; ?>
<br><br>
<form method=“post” action=“dam.php”>
<input type=“hidden” name=“fm” value=“joinfm”>
<table align=“center” cellspacing=“5”> <?
if ($error == 1) {
print “<tr><td colspan=2 style=“padding-left:10px”>”.$message."<br><br></td></tr>";
} else
print “<tr><td colspan=2 style=“padding-left:10px”>* = required fields.<br><br></td></tr>”; ?>
<tr><td align=“right”><b>Name</b></td><td><input size=“25” type=“text” name=“girl_name” value="<?=$gname?>"></td></tr>
<tr><td align=“right”><b>Age</b></td><td><input size=“3” type=“text” name=“girl_age” value="<?=$gage?>"></td></tr>
<tr><td align=“right”><b>Nationality</b></td><td><input size=“20” type=“text” name=“girl_nat” value="<?=$gnat?>"></td></tr>
<tr><td align=“right”><b>Location</b></td><td><input size=“20” type=“text” name=“girl_loc” value="<?=$gloc?>"></td></tr>
<tr><td align=“right”><b>Phone</b></td><td><input size=“25” type=“text” name=“girl_phone” value="<?=$gphone?>"></td></tr>
<tr><td align=“right”><b>Email</b></td><td><input size=“25” type=“text” name=“girl_email” value="<?=$gemail?>"></td></tr>
<tr><td align=“right”><b>Message</b></td><td><textarea cols=“35” rows=“5” name=“girl_message”><?=$gmessage?></textarea></td></tr>
<tr><td colspan=“2” align=“center”><input type=“submit” value=" send >> " style=“border: #FFFFFF 1px outset;”></td></tr>
</table>
</form> <?
} else
print “<br><br><br>Thanks for registering your interest to work with us. We will review your application and contact you as soon as possible.”; ?>
</td></tr></table>