mysql error

i am getting this error Unexpected Error ! SQL : mysql_error() after clicking register me…im posting both my codes
plsssss help me…

mou.php

<?php include "../includes/drop.php"; include_once "common.php"; //========= $Srno=$_GET['Srno']; $mou=""; $name=""; $day = ""; $date=""; $coord=""; $client=""; $tel=""; $mob=""; $fb=""; $sex=""; $sell=""; $firstadvance=""; $balreceived=""; $shootreceived=""; $rolls=""; $cheque=""; $shootdate=""; $postshoot=""; if(!empty($Srno) && isset($Srno)){ $objectIndex = "SD"; $fields = _getFields("MF"); $whereclause = "WHERE Sr_no=$Srno "; $otherclause = ""; $result_array = _getRows($objectIndex, $fields, $whereclause, $otherclause); if(!empty($result_array)){ for($i=0;$i <?php _displayTitle();?> ::Memorandum Of Understanding(MOU)
<form name=frmMou method=post action="save_mou.php" >
 <input type="hidden" name="txtsrno" value="<?php echo $Srno?>">
        <tr>
          <td height="30" class="txt1">&nbsp;&nbsp;MOU no</td>
          <td height="30" class="txt1">
            <input name="txtmou" type="text" class="form1" size="30" value="<?php echo $mou?>">
          </td>
        </tr>
		<tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Day</td
          <td height="30" class="txt1">
           <?php drop("arr_day","$day");?>
          </td>
        </tr>

        <tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Date </td>
          <td height="30" class="txt1"><?php drop("arr_date",$datearr[2],"sign_date" );?><select name="sign_month"  class="form1"><option value="">-Select-</option>
>January >February >March >April >May >June >July >August >September >October >November >December <?php drop("arr_year",$datearr[0],"sign_year");?> (DD/MM/YYYY)
		<tr>
          <td height="30" class="txt1">&nbsp;&nbsp; Telephone No.</td>
          <td height="30" class="txt1">
            <input name="txttel" type="text" class="form1" size="30" value="<?php echo $tel?>">
          </td>
        </tr>
        <tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Mobile No.</td>
          <td height="30" class="txt1">
            <input name="txtmobile" type="text" class="form1" size="30" value="<?php echo $mob?>">
          </td>
        </tr>
		<tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Number of rolls</td>
          <td height="30" class="txt1">
            <input name="txtrolls" type="text" class="form1" size="20" value="<?php echo $rolls?>">
          </td>
        </tr>
		<tr>
          <td height="30" class="txt1">&nbsp;&nbsp;First advance received</td>
          <td height="30" class="txt1">
            <input name="txtfirstadvance" type="text" class="form1" size="30" value="<?php echo $firstadvance?>">
          </td>
        </tr>





		<tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Balance received</td>
          <td height="30" class="txt1">
            <input name="txtbalreceived" type="text" class="form1" size="30" value="<?php echo $balreceived?>">
          </td>
        </tr>
        <tr>
          <td height="30" class="txt1">&nbsp;&nbsp;Shoot Date</td>
          <td height="30" class="txt1">
            <?php drop("arr_date",$shootarr[2],"shoot_date");?><select name="shoot_month"  class="form1"><option value="00">-Select-</option>
>January >February >March >April >May >June >July >August >September >October >November >December <?php drop("arr_year","$shootarr[0]","shoot_year");?> (DD/MM/YYYY)
        <tr>
          <td height="30" class="txt1">&nbsp; Postpond shoot</td>
          <td height="30" class="txt1"><?php drop("arr_date",$postarr[2],"post_date" );?><select name="post_month"  class="form1"><option value="">-Select-</option>
>January >February >March >April >May >June >July >August >September >October >November >December <?php drop("arr_year",$postarr[0],"post_year");?> (DD-MM-YYYY)
        <tr>
          <td colspan="2" valign="top" class="form_text" align="center"><br>
              <input name="btnmou" type="submit"  class="form1_bu"  value="Register Me" ID="Submit1" onClick="return validate();">
              <input name="btnback" type="button" class="form1_bu" onclick="history.back();" value="Back">
          </td>
        </tr>
        <tr>
          <td colspan="2" valign="top" class="form_text" align="center">&nbsp;</td>
        </tr>
      </table></td>
    </tr>
  </table>
 </form>
</td>
  Memorandum Of Understanding(MOU)
   
  Name
  Co-ordinator Name
  Client's Name
  Feedback <?php echo $fb?>
  Sex <?php drop("arr_sex","$sex");?>
  Selling Price
  On shoot received
  Cheque Details <?php echo $cheque?>
</body>

save_mou.php

<? include_once "common.php"; ini_set('display_errors', 'On'); error_reporting(E_ALL & ~E_NOTICE); //include "../includes/drop.php"; //$model_type=$_POST['model_type']; $sign_date=$_POST['sign_date']; $sign_year=$_POST['sign_year']; $sign_month=$_POST['sign_month']; $date=$shoot_year."-".$shoot_month."-".$shoot_date; $shoot_date=$_POST['shoot_date']; $shoot_month=$_POST['shoot_month']; $shoot_year=$_POST['shoot_year']; $shootdate=$shoot_year."-".$shoot_month."-".$shoot_date; $post_date=$_POST['post_date']; $post_month=$_POST['post_month']; $post_year=$_POST['post_year']; $postshoot=$post_year."-".$post_month."-".$post_date; $Srno=$_POST["txtsrno"]; $mou=$_POST["txtmou"]; $name=$_POST["txtname"]; $day = $_POST["arr_day"]; $date=$_POST['sign_year']."-".$_POST['sign_month']."-" .$_POST['sign_date']; $coord=$_POST["txtcoord"]; $client=$_POST["txtclient"]; $tel=$_POST["txttel"]; $mob=$_POST["txtmobile"]; $fb=$_POST["txtfb"]; $sex=$_POST["arr_sex"]; $sell=$_POST["txtsell"]; $firstadvance=$_POST["txtfirstadvance"]; $balreceived=$_POST["txtbalreceived"]; $shootreceived=$_POST["txtshootreceived"]; $rolls=$_POST["txtrolls"]; $cheque=$_POST["txtcheque"]; $shootdate=$_POST['shoot_year']."-".$_POST['shoot_month']."-" .$_POST['shoot_date']; $postshoot=$_POST['post_year']."-".$_POST['post_month']."-" .$_POST['post_date']; //==== $objectIndex = "SD"; $whereClause = ""; if(!empty($Srno) && ($Srno!="") ){ $actionFlag = "E"; $fields="Sr_no='".$Srno."',mou='".$mou."',name='".$name."',day='".$day."',date='".$date."',fb='".$fb."', sex='".$sex . "', sell='" . $sell . "', firstadvance='" . $firstadvance . "', balreceived='" . $balreceived . "', shootreceived='" . $shootreceived. "', rolls='" . $rolls . "', cheque='" . $cheque. "', shootdate='" . $shootdate. "', postshoot ='" . $postshoot . "'"; $whereClause="where Sr_no=".$Srno; } else{ $actionFlag="A"; $fields="Sr_no,mou,name,day,date,fb,sex,sell,firstadvance,balreceived,shootreceived,rolls,cheque,shootdate,postshoot"; $values="'".$Srno."','".$mou."','".$name."','".$day."','".$date."','".$fb."' ,'".$sex."','".$sell."','".$firstadvance."' ,'".$balreceived."','".$shootreceived."','".$rolls."','".$cheque."' ,'".$shootdate."','$postshoot'"; } execute_Query($objectIndex, $fields, $values, $whereClause, $actionFlag); //if(!empty($Srno) && ($Srno!='') ){ //$values = ""; //$ts=date(YmdHis); //$objectIndex = "SD"; // $whereClause = " WHERE Sr_no=$Srno"; // $desc="Profile Edited"; // $actionFlag = "A"; // $fields = "Description , lusername, ts, userid"; // $values = "\"" . $desc . "\", \"" . $_SESSION['admin'] . "\" , \"" . $ts . "\" , $regid "; //execute_Query($objectIndex, $fields, $values, $whereClause, $actionFlag); if(mysql_error()){ displayerror("
  • Unexpected Error ! SQL : mysql_error() "); } else{ ?>
    		<script>
    			alert("Data has been successfully saved.")
    			//location.href = "viewprofile.php?sex=F";
    		</script>
    
    <? } ?>
  • guys pls help me fast…i hv to submt ths today…plsss

    Sponsor our Newsletter | Privacy Policy | Terms of Service