|
Helping ordinary people create extraordinary websites! |
Amrit HallanCompany: BytesWorthAuthor Bio: Amrit Hallan is a freelance web developer. You can checkout his website at http://www.bytesworth.com. For more such articles join BYTESWORTH REACHOUT at http://www.bytesworth.com/br/default.asp or if you have a web dev related question then post it at http://www.business180.com/index.php Tutorials written by Amrit Hallan: Adding records to a MySQL database using PHP There comes time when your website tends to transcend the boundaries of mere brochure type looks. There is a need to interact, to seem dynamic, and to respond according to your visitor's behavior. You also want your visitors to go through a list of offerings that run into hundreds. Creating hundreds of web pages having a uniform layout for hundreds of products can become an overwhelming task. Monday, 23rd February 2004 Arrays in ASP Now and then you have to store related items in arrays. I assume you are aware of their fundamental features of arrays, so I'm going to tell you how they are handled in ASP, in VBScript. Wednesday, 1st June 2005 Calculating Difference Between Two Dates Using PHP Suppose you want to know the age of a person given her birth date. Let’s say her birth date is "09-23-1969". Although in this case you might say that we don’t need a program to compute the age, but assuming there are 1000s of records in your database... Tuesday, 18th October 2005 Converting to Lower Case and Upper Case in JavaScript To convert a string to lower case and upper case in JavaScript. Wednesday, 19th October 2005 Creating Rollover Effect Using CSS List Menus Ever seen those fancy links where they change the appearance as soon as you place your mouse cursor on them. See a simple example of a rollover effect here. The CSS definition of this simple example goes like this... Tuesday, 18th October 2005 Decision Making and Looping A common feature of any programming script/language is, its ability to perform repeat tasks until a condition is satisfied, and, its ability to take decision. After all, there can be no logic if a program cannot decide what to do and what not to do (sounds like a Shakespearean statement). Wednesday, 1st June 2005 Disabling the Right-click Mouse Button Sometimes you don't want the visitor to be able to click the right mouse button and do all the stuff associated with it. Although personally I'm not in favor of such gimmicks and limit the visitor's independence, you learn something new in this tutorial. Wednesday, 1st June 2005 Displaying Current Date with JavaScript and Basic Math Calculations In HTML, there is no such thing as <date> </date>. We have to use either VBScript or JavaScript. Since here we are learning JavaScript, we'll be taking the services of JavaScript to display the current date on our web page. Wednesday, 1st June 2005 Dumping Form Information Onto a Web Page There comes a time when you have to create very complex, very comprehensive online forms consisting of 30 to 40 fields. While debugging the form output, or while validating the individual form fields (for example, if all the fields have been filled), you need to dump all the form field with their names and with their respective values onto a web page so you can see exactly what is coming from where. This tutorial tells you how to do that. Wednesday, 1st June 2005 Emailing Form Data with ASP Recently a client asked me to write a CGI program to handle the form output at his site. As usual, he wanted the form content, entered by the visitor, to be sent to him in a readable format. Wednesday, 1st June 2005 Finding the Length of a String in JavaScript When I used JavaScript to find the length of a string for the first time, I kept testing a function something like str.length(), whereas in JavaScript length is not a function, it is a property of the string object. Wednesday, 19th October 2005 Getting Your Hands Dirty With VBScript I know some people don't like VBScript for being Microsoft-Centric, but it's very easy to get familiar with, and once you know how to create your ASP pages in VBScript, you can move on to any programming language of your choice. Wednesday, 9th June 2004 HTML Tables Tables are used to display information in an orderly manner. Incidentally, here we are not talking furniture. A table means tabular representation of certain data on your computer screen or in printed form. Wednesday, 1st June 2005 Installing Personal Web Server If you want to work with ASP (Active Server Pages) on your personal computer, you need to install the Personal Web Server (PWS). As the name indicates, it's a server. Unlike the normal HTML pages, dynamic pages (either created with CGI, PHP, ASP or Cold Fusion) require some sort of a server to carry on their business. Wednesday, 9th June 2004 JavaScript - Formatted Date, Back, Forward Buttons Today you'll learn how to display date in the format 17 August, 2001 on your web page. As already elucidated in the preceding section, simply using the Date() function isn't much help. And anyway, there is no function in JavaScript that gives months in words like January, February, etc. Wednesday, 1st June 2005 JavaScript - Pre-loading Images for Faster Display Remember the rollover effect? If there are just a couple of graphics to grapple with, it does not pose a problem, but an ideal navigation bar generally consists of more than 6 or 7 buttons that need to be rolled over. A very odd situation manifests itself when your mouse is over a button and it is taking ages for the rollover effect to happen. Wednesday, 1st June 2005 JavaScript Equivalent of PHP Explode Function In PHP we can easily break a long string into smaller parts by using the explode() function of PHP. In runtime, this function works like this... Tuesday, 18th October 2005 Learning the Basics of JavaScripting JavaScript is not a full-fledged programming language so you cannot churn out geeky applications with it. But yes, you can make your web site a lot more interactive and dynamic if you know how to use it to your convenience. In the initial stages, we are going to toy around with the basic syntax. Wednesday, 1st June 2005 Learning to Function and Loop HTML is boringly static, it's rigid, and, is least interactive. DHTML makes it dynamic and responsive. Now, DHTML is not another of those nerdy technologies, it's just that when we come up with a concoction of HTML + JavaScript (or VBScript), the guys call it DHTML just to sound cool. DHTML stands for, Dynamic Hyper Text Markup Language (ok, so now you can actually figure out what's all with HTML). Wednesday, 1st June 2005 Looping through form elements using JavaScript An example of looping through all the form fields could be checking and unchecking all the check boxes present on a page (checking all the records to delete, or adding all the items to a shopping cart, for instance). Friday, 9th December 2005 Navigation Bar and Bulleted Lists We are going to learn to make a navigation bar so that the Web site becomes "navigable", and then we learn to present point-wise information in the form of "Bulleted Lists". Wednesday, 1st June 2005 Opening A New Browser Window Sometimes you don't want the visitor to leave your current page. So when a link it clicked, instead of a new page loading on the same window, you can have the page in a new browser window. All you have to do is... Wednesday, 1st June 2005 Programmatically Deciding Which Database to Connect in PHP Most of the time, while working with PHP and MySQL, we have to switch between the local PC and the remote server. To connect to a database, I often used the following function... Monday, 17th October 2005 Publishing Newsletter Using PHP & MySQL - 2 In this article we'll make a form that accepts name and email. There'll be a JavaScript to check if valid email has been entered. Let me point out that the validation here is just going to be for illustration purpose. Someday we'll discuss a complicated script to check valid email addresses. Sunday, 28th March 2004 Publishing Newsletters Using PHP & MySQL Are you tired of using third-party tools to send out routine notifications and emails to your clients? Or, do you want to send your newsletters with individual names of people in the beginning. This series of articles helps you achieve this. Friday, 26th March 2004 Publishing Newsletters Using PHP & MySQL - 3 By the end of the previous article we sent a verification email to whomever submits the subscription form. The email should contain the following message... Sunday, 28th March 2004 Publishing Newsletters Using PHP & MySQL - 4 The time has arrived to launch your publishing career at last. The subscribers have subscribed and your emails have been validated. Now all you have to do is, write the newsletter, copy/pase it in the box and click the submit button. Monday, 29th March 2004 Redirecting URL Whenever you want to generate dynamic pages you often have to resort to using some server side scripting language such as PHP or ASP. But let us assume that there are only three or four pages that could be chosen from a drop-down menu (a combo-box). Wednesday, 1st June 2005 Sending HTML Email with ASP Last time you learnt how to receive or send form data using ASP. Let's now see how we can send HTML messages using the Active Server Pages. The process is quite similar to sending the regular, text message, but yes, there are a few modifications. Wednesday, 1st June 2005 Setting Up Apache, PHP & MySQL On Windows I'm writing this article assuming you're running Windows XP on your computer. Even if you are not, you can use this article to setup these three on almost all basic Windows flavors. Wednesday, 25th February 2004 Sorting an Array in PHP Now and then you need to sort your arrays alphabetically or numerically, if nothing else, then just to apply some programming logic and attain the desired output. You can sort an array in PHP by using two functions... Monday, 14th November 2005 The Mouseover / Rollover Effect This is what you often see on various web sites - when you hover your cursor over an image, it metamorphoses into some other image. For instance, a simple two-dimensional button changing into three-dimensional with shadow underneath. Wednesday, 1st June 2005 User Feedback HTML Form After going through this celestial section you'll be able to make your own HTML feedback forms so that the visitors can send you feelers about what are their intentions vis-à-vis you and your Web site, and other sundry things that may or may not concern you. Wednesday, 1st June 2005 Using Arrays in JavaScripts We'll revert back to our form processing script after having a peek at arrays. Technically, an array is a sequence of logically related data items. It's kind of a row made of boxes, with each box holding a value. Wednesday, 1st June 2005 Validating Form Input - II This time we'll make a form that collects information about the visitor at your site. You must have filled-in copious registration forms or survey forms where you had to enter your name, your email, your address, etc. Sometimes users, intentionally or unintentionally, enter wrong information that can either spoil your database scheme or give you lots of useless data and hence, waste your precious server space. Wednesday, 1st June 2005 Validating Form Input I You have learnt that HTML forms are used to gather information from online visitors to your Web site. There are registration forms, there are subscription forms, there are survey forms, and there are navigational forms - forms galore, everywhere. Wednesday, 1st June 2005 Your First ASP Page ASP pages (Active Server Pages page sounds a bit melodramatic but its easier to refer to them like this) are nothing but web pages. The difference is that they have an extension .ASP and you write the code in a Server Side Scripting language. Wednesday, 9th June 2004 |
|