PHP INSERT SCRIPT NOT WORKING


#1

Hello every one, below is a php script that has refused to insert into the database and it is not returning any error just that it would run and wait for the next input. Can I get someone to help me looked at it with an Eagle eye
The code is as follows

<?php if($_POST && !empty($_POST['jobcode']) && !empty($_POST['jobtitle']) && !empty($_POST['qualification']) && !empty($_POST['experience']) && !empty($_POST['jobdetails'])&& !empty($_POST['jobdescription'])): $date=$_POST['date']; $jobcode=$_POST['jobcode']; $jobtitle=$_POST['jobtitle']; $qualification=$_POST['qualification']; $experience=$_POST['experience']; $jobdetails=$_POST['jobdetails']; //$jobdescription=$_POST['jobdescription']; //$query="INSERT INTO jobpost(date,jobcode,jobtitle,qualification,experience,jobdetails,) VALUES('$date','$jobcode','$jobtitle','$qualification','$experience','$jobdetails')"; //mysql_query($query) or die(mysql_error()); //echo "proceed"; $query = "INSERT INTO jobpost SET date='".$date."', jobcode='".$jobcode."', jobtitle ='".$jobtitle."', qualification ='".$qualification."', experience = '".$experience."', jobdetails = '".$jobdetails."' "; mysql_query($query,$connect) or die(mysql_error()); echo "You have inserted a new job successfully"; endif; ?>
    </div>
    
    <!-- Form -->
   
   <form id="form1" name="form1" method="post" action="" onsubmit="return FrontPage_Form1_Validator(form1)" class="form" >
        <fieldset>
            <div class="widget">
                <div class="title"><img src="../img/list.png" alt="" class="titleIcon" /><h6>Fill in the fields appropriately.... Please note that no Jobpost can have the same jobcode</h6></div>
                <div class="formRow">
                    <label>Date:</label>
                    <div class="formRight"><input type="text" name="date" id="date" readonly="readonly"/>
      <script type="text/javascript">

document.getElementById(“date”).value = new Date();




Job Code:




Job Title:




Qualification Needed:




Experience Needed:




Job Details:

                <div class="form-row">
   <input type="submit" class="grey" value="Cancel" />
   <input type="submit" value="Submit" class="float_r" name="button" id="button" onclick="javascript:return confirm('Are you sure your job posting details are correct?, If no please click on cancel to re-check.')" />
  </div>
                    <div class="clear"></div>
                </div>
            </div>
        </fieldset>
        
        <fieldset>
        </fieldset>
        
        <fieldset>
        </fieldset>
        
        <fieldset>
          <div id="unmask"></div>
        </fieldset>
    </form>

#2

I got it working thks…