Validation for Mobile text Field by JavaScript
<script>
function Validate()
{
var y =document.getElementById("y").value;
if(isNaN(y)||y.indexOf(" ")!=-1)
{
alert("Enter numeric value")
return false;
}
if (y.length>10)
{
alert("enter 10 characters");
return false;
}
return true;
}
</script>
This blog will help you in web designing & development like HTML,CSS, HTML5,JAVASCRIPT,PHP,MySQL
Monday, 24 June 2013
Tuesday, 4 June 2013
Redirect to other page by dropdown list :
<?php
if (isset($_POST['nav'])) {
header("Location: $_POST[nav]");
}
?>
<script type="text/javascript">
$(function() {
$("#submit").hide();
$("#page-changer select").change(function() {
window.location = $("#page-changer select option:selected").val();
})
});
</script>
<h1 align="center"><strong>Search PAID Students Records</strong></h1>
<p align="center"> </p>
<form name="form1" id="page-changer" action="" method="post">
<div align="center"><strong>Select Your Option </strong>
<select name="nav">
<option value="">Select Your Option...</option>
<option value="paidstp.php">All Paid Students</option>
<option value="paidlocation.php">Search Date & Location Wise</option>
</select>
<input type="submit" value="Go" id="submit" />
</div>
</form>
Search records by entering multiple fields
Search records by entering multiple fields
<form name="form1" action="searchdrop2.php" method="post" onsubmit="return ValidateContactForm()"; >
<table width="533" height="108" border="0" bgcolor="#FFFF99">
<tr>
<td width="210" height="31">
<strong>BATCH DATE</strong></td><td width="313"><select name="term2" >
<option value="" >Select option</option>
<option value="22nd Apr 2013" >22nd Apr 2013</option>
<option value="29th April 2013" >29th April 2013</option>
<option value="06th May 2013" >06th May 2013</option>
<option value="13th May 2013" >13th May 2013</option>
<option value="20th May 2013" >20th May 2013</option>
<option value="27th May 2013" >27th May 2013</option>
<option value="03rd June 2013" >03rd June 2013</option>
<option value="10th June 2013" >10th June 2013</option>
<option value="17th June 2013" >17th June 2013</option>
<option value="24th June 2013" >24th June 2013</option>
<option value="01st July 2013" >01st July 2013</option>
<option value="08th July 2013" >08th July 2013</option>
<option value="15th July 2013">15th July 2013</option>
</select></td></tr>
<tr>
<td height="24">
<strong>PAID/UNPAID </strong></td><td><select name="term3" >
<option value="" >Select option</option>
<option value="PAID" >Paid</option>
<option value="0 ">Unpaid</option>
</select></td>
</tr>
<tr>
<td height="24">
<strong>SELECT LOCATION </strong></td><td><select name="term4" >
<option value="" >Select option</option>
<option value="Delhi" >Delhi</option>
<option value="Noida" >Noida</option>
<option value="Gwalior" >Gwalior</option>
<option value="Haryana" >Haryana</option>
<option value="Ahmedabad" >Ahmedabad</option>
<option value="Bangalore" >Bangalore</option>
<option value="Bhopal" >Bhopal</option>
<option value="Chandigarh" >Chandigarh</option>
<option value="Chennai" >Chennai</option>
<option value="Dehradun" >Dehradun</option>
<option value="Ghaziabad" >Ghaziabad</option>
<option value="Hyderabad" >Hyderabad</option>
<option value="Jaipur">Jaipur</option>
<option value="Kolkata">Kolkata</option>
<option value="Lucknow">Lucknow</option>
<option value="Mumbai">Mumbai</option>
<option value="Nagpur">Nagpur</option>
</select></td>
</tr>
<tr><td colspan="2">
<div align="center">
<input class="button" type="submit" name="submit" value="Search">
<input class="button" type="reset" name="reset" value="Reset">
</div></td>
</tr>
</table>
</form>
php code
<table>
<tr>
<td align="center"><h1><strong>Details of Student</strong></h1></td>
</tr>
<tr>
<td>
<table width="524" height="55" border="1">
<tr>
<td width="59" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Name</strong></font></div></td>
<td width="60" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>STP ID</strong></font></div></td>
<td width="69" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Course Name</strong></font></div></td>
<td width="79" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Batch Date</strong></font></div></td>
<td width="81" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Contact No.</strong></font></div></td>
<td width="68" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Location</strong></font></div></td>
<td width="62" bgcolor="#000000"><div align="center"><font color="#FFFFFF"><strong>Fee Status</strong></font></div></td>
</tr>
<?php
include('config.php');
$term2=$_POST['term2'];
$term3=$_POST['term3'];
$term4=$_POST['term4'];
$query=mysql_query("SELECT * FROM tbltransaction WHERE batch_date='$term2' and status='$term3' and training_location='$term4'");
//$result=mysql_query($query);
$num=mysql_numrows($query);
$i=0;
while ($i < $num){
@$b_name=mysql_result($query,$i,"b_name");
@$refno=mysql_result($query,$i,"refno");
@$course_name=mysql_result($query,$i,"course_name");
@$batch_date=mysql_result($query,$i,"batch_date");
@$b_telephone=mysql_result($query,$i,"b_telephone");
@$training_location=mysql_result($query,$i,"training_location");
@$status=mysql_result($query,$i,"status");
echo "<tr><td> $b_name</td><td>RST/STP/$refno</td><td> $course_name</td><td>$batch_date</td><td>$b_telephone</td><td>$training_location</td><td>$status</td></tr>";
$i++;
}
?>
</table></td></tr></table>
Subscribe to:
Posts (Atom)