vendredi 31 octobre 2014

Time Validation Range form Mysql


Vote count:

0




This is my Javascript



<SCRIPT TYPE="text/JavaScript">
function validateHhMm(inputField) {
var time= $("#time").val();
var isValid = /^(time)?$/.test(inputField.value);

if (isValid) {
inputField.style.backgroundColor = '#bfa';
} else {
inputField.style.backgroundColor = '#fba';
}

return isValid;
}
</SCRIPT>


PHP Script:



<?php
include 'connect.php';
$time = " SELECT * from schedule where id_ship=24";
$show_time = mysql_query($time);
$row = mysql_fetch_array($show_time);
?>

<input type="text" onchange="validateHhMm(this);" name="time" id="time" value="
<?php
echo $row['time_coming'];
?>">


this schedule table



id_ship | time_coming |
----------------------------
24 | 11:10:02 |


I want to input form time again. And valid value must same or above 11:10:02. Invalid value under 11:10:02. So, what should I do in my Javascript?



asked 1 min ago







Time Validation Range form Mysql

Aucun commentaire:

Enregistrer un commentaire