![]() |
|
||
Description |
This script creates html tables on the fly by reading in your data from an ascii text file. This reduces the hassles of having to upload a new html file with <TABLE> tags each time you need to modify your data. This script is useful for posting a price list or any other type of information that is updated regularly. The only thing you need to change is the text file containing your data, and the Table creator does the rest.
| ||
How it works |
The example I have here is for a computer dealer product listing. The dealer uploads a text file containing a list of all products like Ram, Motherboards, Hard drives etc. An additional Search feature has been added which tells the script to only display products that match a certain criteria, for example : Display all RAM or Display all Monitors etc. We also send the script what we want the table to look like (border, cellpadding,spacing,width), a heading for the table, name of the text file to read and the number of fields in each record. | ||
Sample text file |
You'll notice that all the fields in the file are separated by pipe "|" characters, and the first line contains the Titles of each field (Description and Price). We can also insert html code into the text file, so in this case the title of each field will come out in bold. Following is how we activate the script. http://technotrade.com/table/table.cgi?(1),(2),(3),(4),(5),(6),(7),(8),(9) 1 : text file name 2 : Query search string 3 : Title or Heading name 4 : Width of the table 5 : Border of the table 6 : CellPadding 7 : CellSpacing 8 : Column Span 9 : Number of Fields So if we wanted to search for RAM in the prices.txt file, we would call the script like this : http://..../table.cgi?prices.txt,RAM,Memory,55%,1,5,5,2,3 If we were searching for Hard Drive then we need to insert a "+" sign instead of a space : http://..../table.cgi?prices.txt,Hard+Drive,Hard+Drives,55%,3,5,5,2,3 | ||
Download and Demo |
![]()
![]() ![]() |