Skip to main content

Posts

Showing posts from April, 2012

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...

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...

Uploads in Html Forms

Upload Form: The upload form is simply a utility for the users to upload pictures, songs, documents and other stuff for you website.This is very useful for your sharing of website. How to make them? You know the simple input tags just change the type to file. Upload File Code: <input type="file" / > Upload File Code: Max File Size To limit the size of the file being uploaded and saving you precious web server space. We make use of a hidden input field and set a few specific attributes. Max File Size Code: <input type="hidden" name="MAX_FILE_SIZE" value="500" /> <input type="file" /> Max File Size Example: The value specified is the maximum allowable KB to be uploaded via this form. A value of 100 will allow a file up to 100kb.

Check Boxes in Html Forms

Check Boxes: Check boxes are usually use to know the interest of any users. Suppose you want to know about users which type of fruits they like and you have 4 check boxes user either check one or more than one it's depend on user. Attributes of Check Boxes: type="checkbox" name="something" value="something" checked="yes" or "no" If you are making a list of fruits then name all the check boxes fruit which is essential for the script languages. Don't panic it's just a reference. Check Boxes Example: <p>Please select every fruit that you eat.</p> Apple: <input type="checkbox" name="fruit" value="apple" /><br /> Banana: <input type="checkbox" name="fruit" value="banana" /><br /> Grapes: <input type="checkbox" name="fruit" value="grapes" /><br /> Cherry: <input type="checkbox" n...

Radio Buttons in Html Forms

Whenever you want to ask for something that he like you or another suppose so there is 2 option me or else so radio button is used or another point of view say's you accept our terms or not this is the common example of radio button. Radio Button Code: <form name="qtutor" action="mailto:pateltutor1@email.com" method="post"> <h4>Please select your favorite Sport.</h4> <input type="radio" name="sport" /> : Cricket<br /> <input type="radio" name="sport" /> : Football<br /> <input type="radio" name="sport" /> : Volleyball<br /> </form> Radio Button Example: Please select your favorite food category. : Cricket : Football : Volleyball The key thing is the name of radio button if you have multiple radio buttons in forms then take care of the name of radio button suppose in upper example we ask for only sport now we will ask for sport and ...

Password Field in Html Forms

Password Fields: You know better that password is necessary for login and this is not so difficult to learn it. If you know the input text field then you can easily make your password field just you have to change type="password". One more thing you seen size and maxlength which is actually the size of the text field how much widen is it? and the max length that how much characters stored in it. If you want to store 5 character password then maxlength="5". Password Fields Code: <input type="password" size="5" maxlength="5" /><br /> <input type="password" size="15" maxlength="15" /><br /> <input type="password" size="25" maxlength="25" /> Password Fields Example: Remember one thing these password fields are not encrypted. It can be encrypted by scripting language.

Input Tags in Html Forms

Html - Inputs: Input fields are those fields which fill by users and you save them as comments. Which can be written as directly closing tag <input /> after input give a space and give a type of your own choice and use it shown in example.There are many types of input fields types such as type=" text " type=" password " type=" checkbox " type=" radio " type=" submit " type=" reset " type=" hidden " Html - Text Field: Here is the two example of input fields First one is text and the second one is password. You can try making different text fields like us. Text Field Code: <input type="text" /> Text Field Example: Here you see the text field simple example. Html - Password Field: Passwords fields are similar to the input for the text just change the type="password" and it will change to password field no text shown just dots seems as usual seems in passwords. Password Field Code: ...

Italics in Html

The italics tags use to highlight the fonts but not like bold it makes your font just like dance a step. These tags are not intended to to style your font. It's use to emphasize your fonts. Code: Italic <i>tag</i>! <em>Emphasized</em> Text! Example: Italic tag ! Emphasized Text! Code: <b>HTML</b> <i>Hyper Text Markup Language</i>  or <b>HTML</b> <em>Hyper Text Markup Language</em> Example: HTML Hyper Text Markup Language or HTML Hyper Text Markup Language Code: <p>Johnson is <b><i>DR.</i></b></p> Example: Johnson is DR.

Bold in Html

Creating bold text can be accomplished through the use of the <b> bold tag. Code: <b>This is the BOLD text!</b> Example: This is the BOLD text! Code: <p> <b>Don't</b> go there! </p> Example: Don't go there!  Code: <p> <b>Umbrella:</b> Helps in rain. </p> Example: Umbrella: Helps in rain.

Lists In Html

Lists In Html: There are 3 types of lists in Html. <ol> - Ordered List <ul> - Unordered List <df> - Definition List Html - Number/Ordered List Ordered lists actually shows with numbers bullets same like word processors. The tag which is use to add order list in your Html page is <ol> and the items of this list shows in <li>. See the example. Number/ Order List Example:  <ol> <li>John</li> <li>Miller</li> <li>Bunty</li> </ol> Numbered/Order List Preview: John Miller Bunty Just simply add your wish from which number you want to start 5,6 or whatever.   Number/Order List Advance This is a little bit advance trick for order or number list you can start it with any number like you want to start a list from number 5 or from 7 or etc you can do it by using it's attribute let's see the example and preview. Number/Order List Advance Example: <ol start="5"> <li>John</li> <li...

Iframes in Html

Iframes: Iframes are useful in adding sub-pages in the webpage like if you want to add page in page see example at the end. How to Add an Iframe: <iframe src=" URL "></iframe> There are 4 basic attributes to add an iframe. usually one, Src="URL" commonly use but suppose if you want to add height and width too so you can do it. Iframe - How to Set Height and Width: Height and Width of any iframe allows you to set height and width of any iframe. <iframe src="URL" width="200" height="200"></iframe> Change Height Width  with your own values. Iframe - How to Set Borders of Iframe: Iframe has border also so this attribute allows you to add some border around this iframe so it shows that this is embeded iframe.  <iframe src="URL" frameborder="0"></iframe> Change frameborder   with your own values. Iframe - Use iframe as a Target for a Link: An iframe can be used as the target frame fo...

Paragraphs In Html

What is a Paragraph? You know the paragraph in your daily life schools,Colleges etc. But the question is how to write paragraphs in Html. See the example below how to write this. <p> This is the First Paragraph </p> Note: Starting tag is <p> Ending tag is </p> Remember: Don't break the rules otherwise it will broken your page. Attributes of Paragraphs: Here i am talking about the alignment same you see in a word processor like Microsoft Word. The attribute of a Paragraph is showing that which type of Paragraph you want centered, Justify, Right align etc If you want to use any of these attribute then you have to use like this <p align="center" > See Examples: Justify Paragraph <p align="justify"> </p> Center Paragraph <p align="center"> </p> Right Paragraph <p align="right"> </p>

Introduction to Html

Remember: Whenever you are going to design a page or code a page of Html you have to remember 3 things. Tags   Elements: Attributes 1. Tags: 2. Elements: An element consist of <p> opening tag Content: i like Qtutor </p> an ending tag. Accroding to elements of Html that the ( <body> </body> ) , ( <head> </head> ) are elements. Note Again: Whenever you open a tag then close it when it's work done. Attributes: Reliability: What is the reliability of your webpage. It means you have to code carefully because your one mistake can make you in big problem and remember one more thing that your page will be viewed by thousands of users then it have to be user friendly. Prepared yourself: If you are ready and read our introduction to Html's and ready to be a Html designer then go ahead. After this lesson you will actually will be on the rest of the chapters of the Html.

Beginner Html Lesson 2

In the previous lesson we just copy a code and paste it. In this lesson we will guide you through rest of the things what is that let's talk more. We made a webpage with something very weird for beginner don't worry go ahead. <html> : This is the essential thing for any web page and also closing tag </html>. Between these codes we add some more codes <head> </head> , <body> </body> between the body code actually body itself saying that i am body of your webpage. What Head tags containg (<head> </head>) ? Basically head tags contains following <title> <base> <link> <meta> <script> <styles>  What Body tags contains (<body> </body>) ? And a body tags contains anything like your bolded text , your content of any type.Paragraphs , Headings anything. I hope you understand.

Beginner Html Lesson 1

Beginners Html Tutorial What is Html? You see a lot of webpages and websites which have many things and you think how it's made so let me explain you. Whenever a webpage made then it's done that some one coded that page with some coding and that coding is Html. How to make your first Webpage? Note: Before this remember whenever any tag start then it's end too like "<html>" this is a starting tag and ending tag is "</html>" this is the difference that it end with a slash. <html> <head> </head> <body> My First Web Page. </body> </html>  Just copy the above code and paste this code in a text file then save it but saved it as "name.html" (with out quotes ") whenever you place a .html while saving the document then it saved as a webpage. Now go to the place where you save "name.html" and double click it. It will open in a web browser. Yes you made it. Brief Description: What is tag ? A ...