Hi this is nathen can you please some one help me the following is my form what i want is when ever i fill an empty value that is nothis in my text box and when click on shareacoupon button i need a message that empty values are not allowed this is urgent.Thanks in advance ....

<?php
ob_start();

extract($_REQUEST);
include("includes/connection.php");
if(isset($_POST["submit"]))
{
 $sql_insert="INSERT INTO `fair`.`couponshare` (`storename` ,`code` ,`offer` ,`expiration Date`)
VALUES ('$store_name', '$store_code', '$deal_discount', '$edate')";
     $res=mysql_query($sql_insert); 
	 }
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="images/style.css">
<link rel="stylesheet" type="text/css" href="chrometheme/chromestyle.css" />
<script type="text/javascript" language="javascript" src="includes/validation.js"></script>
	
<script language="JavaScript" type="text/javascript" src="images/ddmenu.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" />
<script type="text/javascript" src="lang/calendar.js"></script>
<script type="text/javascript" src="lang/calendar-en.js"></script>
<script type="text/javascript" src="lang/calendar-setup.js"></script>
<script type="text/javascript">
    Calendar.setup({
        inputField     :    "f_date_k",     // id of the input field
        ifFormat       :    "%m/%d/%Y",      // format of the input field
        button         :    "f_trigger_k",  // trigger for the calendar (button ID)
        align          :    "Tl",           // alignment (defaults to "Bl")
        singleClick    :    true
    })
	 Calendar.setup({
        inputField     :    "f_date_g",     // id of the input field
        ifFormat       :    "%m/%d/%Y",      // format of the input field
        button         :    "f_trigger_g",  // trigger for the calendar (button ID)
        align          :    "Tl",           // alignment (defaults to "Bl")
        singleClick    :    true
    })
	</script>
</head>
</head>

<body>
<form name="myform" method="post" action="">
<table width="200" border="1">

   <tr>
    <td colspan="2" align="center"><strong><font size="+1" color="#6699FF">Share A Coupon</font></strong></td>
  </tr>
  <tr>
    <td>Store Name:</td><td><input type="text" name="store_name" id="store_name" /></td>
  </tr>
  <tr>
    <td>Code:</td><td><input type="text" name="store_code" id="store_code" /></td>
  </tr>
  <tr>
    <td>Offer:</td><td><input type="text" name="deal_discount" id="deal_discount" /></td>
  </tr>
  <tr>
     <td colspan="2"><span class="normal">
						   Expiration Date:
                            <input type="text" name="edate" class="normal" style="width:80px;" id="f_date_g">
                  &nbsp;<img src="images/calendar.gif" id="f_trigger_g" style="cursor: pointer; "
      onmouseover="this.style.background='red';" onmouseout="this.style.background=''" border="0" /></span></td>
  </tr>
  <tr>
    <td><input type="submit" name="submit" id="submit"  value="Submit coupon"/></td><td align="center"><input type="submit" name="close" id="close"  value="close"/></td>
  </tr>
</table>
</form>
</body>
</html>
This article has been dead for over six months. Start a new discussion instead.