<html>
<head>
<title>user_login</title>
<script language="javascript" type="text/javascript"/>
function validate()
{
if(document.getelementByID('t1').value.length==0)
{
alert(" username is required");
return false;
}
else {
if(document.getelementById('t2').value.length==0)
alert("password is requires");
return false;
}
alert("login successfully");
return true;
}
</script>
</head>
<body>
<form name="frm" action="validation in js.php" method="post">
Enter Username <input type="text" name="t1" id="t1"/>
Enter Password <input type="password" name="t2" id="t2"/>
<input type="submit" name="S1" id="S1" value="Register"
onclick="return validate()"/>
</form>
</body>
</html>
Saturday, June 29, 2013
Friday, June 28, 2013
What is Pagination - PHP
Pagination :
If Database Tables contains more rows like hundreds
Than your output of that table would be heavy in webpages,
Than pagination works : Pagination gives you a power to breakup the database tables to php pages break into parts with limit query.
And You would divide that hundreds of table into like limit of 10 or 20 per page.
Than Limit works like 0 to 9, 10 to 19, etc...
and your pagination works like
<<prev 1 2 3 4 5 .... 1001 1002 next>>
<<prev 1 2 3 4 5 .... 1001 1002 next>>
Wednesday, June 26, 2013
Add javascript in you html
For adding javascript code in your html, You just have to put the script tag in html
For example
<script type="text/javascipt">
<!-- write javascript code here -->
</script>
Put this script tag in your html page head tag section.
<html>
<head>
<script type="text/javascipt">
<!-- write javascript code here -->
</script>
</head>
<body>
<!-- html code here -->
</body>
</html>
Or You may add through an link too..
<html>
<head>
<link rel="text/javascript" href="new.js">
</head>
<body>
<!-- html code here -->
</body>
</html>
And code you data in new.js
<!-- write javascript code here -->
as a separate file
For example
<script type="text/javascipt">
<!-- write javascript code here -->
</script>
Put this script tag in your html page head tag section.
<html>
<head>
<script type="text/javascipt">
<!-- write javascript code here -->
</script>
</head>
<body>
<!-- html code here -->
</body>
</html>
Or You may add through an link too..
<html>
<head>
<link rel="text/javascript" href="new.js">
</head>
<body>
<!-- html code here -->
</body>
</html>
And code you data in new.js
<!-- write javascript code here -->
as a separate file
Subscribe to:
Comments (Atom)