I have this Form on an html page and the associated code on page.php (below).
I keep getting the "Please Fill In All Fields" message. Can you help me fix this?
I'm sure I'm just missing something. Thanks
Html page code:
Code: <form action="/page.php" method="post" name="contact_us" onSubmit="return capCheck(this);">
<table cellpadding="0" width="100%">
<tr>
<td width="10" class="required_field">*</td>
<td width="80">Your Name</td>
<td><input type="text" name="name" maxlength="50" style="width:300px" /></td>
</tr>
<tr>
<td class="required_field">*</td>
<td>Email Address</td>
<td><input type="text" name="email" maxlength="40" style="width:300px" /></td>
</tr>
<tr>
<td></td>
<td>Subject:</td>
<td><input type="text" name="subject" maxlength="40" style="width:300px" /></td>
</tr>
<tr>
<td></td>
<td>Comments:</td>
<td><textarea name="comments" style="width: 100%; height: 250px"></textarea></td>
</tr>
<tr>
<td class="required_field">*</td>
<td>Enter Image Code:</td>
<td><input type="text" value="" name="captext" style="width: 100px" maxlength="6" /></td>
</tr>
<tr>
<td></td>
<td><a onclick="refresh_security_image(); return false;" style="cursor:pointer;"><u>Refresh Image</u></a></td>
<td><img src="includes/captcha.php" border="0" id="verificiation_image" /></a></td>
</tr>
</table>
<p>
<input type="hidden" name="submited" value="1" />
<input type="submit" name="submit" value="Submit" />
</p>
</form>
PHP page code:
Code: //Start Contact Us
if($_POST['submited'] == "1"){
$your_email = "XXXXX"; //This is your email address
$from = "From: xxxxxx.com". "rn"; //This will show as the email sender.
$user_email = $_POST['email'];
$user_name = $_POST['name'];
$subject = $_POST['subject'];
$email_body = $_POST['comments'];
if($user_email == "" or $user_name == "" or $email_body == ""){
$error = "Please Fill In All Fields";
}else{
$message = "Feedback : n nUsers Email : $user_email nUsers Name : $user_name nnSubject : $subject nnn Comments : nn$email_body";
//SEND THE EMAIL
mail($your_email, $subject, $message, $from);
$result = "Your Message Has Been Sent. Thank You";
}
}
//End Contact Us
Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,
Alternate messaging
I have 4 strings in MySQL db1$string1 : Hello$string2 : Hi$string3 : Great$string4 : ThanksAnd I have 3 accounts MySQL db2$User1 : $Pw1$User2 : $Pw2$User3 : $Pw3expected result---------------Hello
How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not going to post my code unless it is necessary. I want to know how to get this into code form using if
Serial number of exernal hard disk/Thumbdrive
Hi guys,
Storing/displaying image urls in a database?
HiBasically I have the following scenario:User chooses picture from list. Picture info is added into the db, including url.However I can't figure out how exactly i should be storing the url for the
Coefficient of a Restitution Hints
Hello. I was wondering if anyone can give me hints on how to write this program...The coefficient of a restitution of a ball, a number between 0 and 1, specifiies how much energy is conserved when a
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button that i would like to have it when selected and i hit either edit or delete the ID is passed to another
AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called through onClick="function ..." on the submit button. That all works perfectly, however the
Need some ideas as to how to go about sorting this array...
Here's how the array's are created..Code: <?phpwhile ($x = readdir($dp)) { $order[] = $p['order']; $files[] = $x;}?>Here's a sample of how they come out..Code: Array( [0]
Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.