Skip to content

Instantly share code, notes, and snippets.

@simonrobb
Created December 18, 2013 02:20
Show Gist options
  • Save simonrobb/8016325 to your computer and use it in GitHub Desktop.
Save simonrobb/8016325 to your computer and use it in GitHub Desktop.
<?php
$GetTheValidationRule=mysqli_query($con,"SELECT * FROM Questions WHERE Form_ID='$FormID' AND QuestionsDataHave='YES' ORDER BY Questions_ID+0, Questions_ID");
$ValidatinArray=array();
$J=0;
while($RowVal=mysqli_fetch_array($GetTheValidationRule)){
$ValidatinArray[$J]= $RowVal['Validation_Type'];
$J++;
}
?>
<script>
$(document).ready(function() {
$("form").submit(function(){
var P= <?php echo json_encode($ValidatinArray); ?>;
var O=P.length;
alert(O);
return false;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment