Skip to main content

Posts

Simple Hit counter

A hit counter will let us know how many times a page is accessed. Incase one visitors loads the page several times, the hit counter willincrease several times (but this is likely to happen only a few times). The code for the hit counter bellow will save the number of hits in afile named counter.txt (the name of this file may be changed). Each time the page is loaded,the file will be read, the number will be increased by one and the newnumber will be saved to the same file. Counter.php <?php //The file where number of hits will be saved; name may be changed;p.e. "/counter_files/counter1.txt" $counterfile = " counter.txt "; // Opening the file; number of hit is stored in variable $hits $fp = fopen($counterfile,"r"); $hits = fgets($fp,100); fclose($fp); //increading number of hits $hits ++; //saving number of hits $fp = fopen($counterfile,"w"); fputs($fp, $hits ); fclose($fp); //printing  hits; you may remove next lin...
Recent posts

Css Menu | Online Service

Overview: CSS3 is changing how we build websites. Even though many of us are still reluctant to start using CSS3 due to the lack of support in some browsers, there are those out there that are moving forward and doing some amazing stuff with its cool new features. No longer will we have to rely on so much JavaScript and images to create nice looking website elements such as buttons and menu navigations. You can build a cool rounded navigation menu, with no images and no Javascript, and effectively make use of the new CSS3 properties border-radius and animation. This menu works perfectly well with Firefox, Opera, Chrome and Safari. The dropdown also works on non-CSS3 compitable browsers such as IE7+, but the rounded corners and shadow will not be rendered. CSS3 transitions could one day replace all the fancy jQuery animation tricks people use. Knowledge Require: Just few clicks required to make a ...

Hidden Fields in Html Forms

What are Hidden Fields? Hidden fields are numbers of uses in browsing session. Suppose you have some hidden Database Mechanism or some value or something hide which is very useful to hide your Sql Queries. Receive queries or input text from users and hide them in  hidden field then pass it to another page this is the main work of hidden field. Hidden Field Code: <input type="hidden" /> Hidden Field Example: There is no display of hidden fields because it can't be seen by user nobody can see it but it is holding some value in background of your page same like i made and there is no preview. Now give it some value and we will give it name and id so we can use it in our server scripts. Hidden Field with Name and Id Attribute: Hidden Field Code: <input type="hidden" name="age" id="age" /> Hidden Field Example: This is the hidden field with name and id attribute. It's hidden because this is already hidden. Hidden Field with Value A...

Submit Buttons in Html Forms

Submit buttons are use to submit the forms whenever user registration is needed submit buttons always used. How to make those submit buttons? Just simple you can make submit buttons if you know the <input> tag then make it's type= submit value="some name" just like submit, send etc. Submit Buttons Code: <input type="submit" value="Submit" /><br /> <input type="submit" value="Send" /><br /> <input type="submit" value="Submit Form" /><br /> Submit Buttons Example: Submit Buttons in Action Code: <form method="post" action="mailto:pateltutor1@gmail.com" > Name:<input type="text" name="First" size="12 maxlength="12" /> Email:<input type="text" name="Last" size="24" maxlength="24" /> <input type="submit" value="Send Email" /> </form> ...

Reset Buttons in Html Forms

Reset Buttons: Reset buttons are use to reset the forms in Html. Sometime users put wrong information then the users don't be worry of removing whole the fields and fill them again just press the reset button and whole the form back to their original state. That's very useful for the user. Html Code: <input type="reset" value="Reset" /> <input type="reset" value="Start Over" /> Html Code: Reset Button in Action: Now we are giving some action for your understanding what reset button done don't panic we give some form tags and other just visit Forms in Html you will also learn how to make it. Reset Button Code: <form action="xyz.php" method="post"> First Name: <input type="text" size="20" maxlength="12" /><br /> Last Name: <input type="text" size="24" maxlength="24" /><br /> <input type="reset" value=...

Text Areas In Html Forms

Text Areas: These are the special kind of input which is as long as you want. It can either be a essay or either be a memo etc. It has an opening and a closing tag. Attributes of Text Areas: cols="10" Columns in Number rows="20" Rows in Number wrap="off" or "hard" or "soft" readonly="yes" or "no" disables="yes" or "no" How to make it?   Text Area Code: <textarea>Text Area!</textarea> Text Area Example: Text Area! Text Area Cols and Rows Adjusting the size of the appearance of the text area requires two attributes, cols and rows. Use a numeric value for each attribute and the larger the value the larger the field will appear.Actually you can say height and width. Text Area Cols and Rows Code: <textarea cols="20" rows="10">Text Area!</textarea> <textarea cols="40" rows="2">Text Area!</textarea> <textarea cols="45...