Show message in TextBox

JavaScript can be used to display some information to the users.When user click on the textbox,
message will be hidden.very simple one but can be used in HTML forms without using will
increase the look and feel of the web page.

<script language=JavaScript>

function clear_username()
if (document.text_form.u_input.value == "username")
document.text_form.u_input.value = "";

if (document.text_form.input.value =="")
document.text_form.input.value ="password";

function clear_password()
if (document.text_form.input.value == "password")
document.text_form.input.value = "";

if (document.text_form.u_input.value == "")
document.text_form.u_input.value = "username";


This a simple HTML form to and when user click the text-box on-focus event will
call my JavaScript function.

<form name="text_form" action="#" method=post>
<input name=u_input onFocus=clear_username() value="username">
<input name=input onFocus=clear_password() value="password">
<input type=submit value=Submit>
<input type=reset>

Simple PHP Pagine

This is a simple php pagine file and You can change this according to your needs.I published this because when I need a pagine file I couldn't find.
line no 03 set the number of result rows. ex-number of product in the page
line no 04 and 05 set the start result row and end row.

$eu =0;

The query will retrieve the specific portion of data that limit by the start and end values.

$query=" SELECT * FROM student_adv limit $eu,$page_end";
echo mysql_error();

while($noticia = mysql_fetch_array($result))

echo "";
echo " $noticia[id]";
echo " $noticia[name]";
echo " $noticia[class]";
echo " $noticia[mark]";

echo "";

Retrieve all the data and count the number of rows in the result.line no 06 count the number of pages.line no 12 print the page numbers and pass the start and end row for the next page.

$query2=" SELECT * FROM student_adv ";
echo mysql_error();
//setting pages
print "";

for($i=0;$i<$pages_count;$i++) { $limitp=$limit; $end_limit=$i*$limit; print " ".$i.""; }

I will appreciate your comments.Let me know any errors or improvements.

jQuery Template

Simple J Query template.Used basic JQuery functions.Anyone can download this template free

just considered JQuery functions and layout of the web colors and text may be boring.


file uploading PHP

If you need a upload a file using PHP. This is a easiest and nice way to do that. Only one line I used. You can add validation part according to your need.

Html part

<form action="upload_file.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />

The enctype attribute of the <form> tag specifies which content-type to use when submitting the form. "multipart/form-data" is used when a form requires binary data.

The type="file" attribute of the <input> tag specifies that the input should be processed as a file. For example, when viewed in a browser, there will be a browse-button next to the input field

one line php script


[file][tmp_name] - temporary storage of file .now we save this file any place we want
path = specific path
[file][name] - name of the file

JQuery Toggle example

This is a very simple toggle example.After done toggle effect I used it different ways. I'm not considering look and feel anyone can change the CSS file very easily.

when click the Login button login box will appear below the button.

screen shot of login box

Jquery code for this example

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">

$(".flip").click(function ()

$(".flip1").click(function ()



html login form

<p class="flip">Login</p>
<p class="flip1">Login</p>

<div class="box">

Username<input type="text" name="user"> <br/><br/>
Password <input type="password" name="password"><br/>
<input type="submit" value="Submit"/>


simple CSS style sheet

<style type="text/css">


p.flip ,p.flip1



Html / Css simple template free

This free website template has been coded in CSS. This is a very simple one and anyone can change it.
Header banner - image or flash banner
Logo - space to add logo
Navigation bar - Top navigation bar
Two columns
Load content to the left panel

Above I uploaded screen shots for get idea.You can download this template using this link.