473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Get a value from a text file.

Hi,
I have basic HTML pages with products and prices in them, and the prices change regularly.
What I would like to do is to use a plain text file with a list of the prices in (that I can easily change and upload), then the HTML pages get their prices based on a name or variable extracted from the text file.
Is this possible ?

Regards,
Oct 7 '07 #1
5 1628
numberwhun
3,509 Expert Mod 2GB
Hi,
I have basic HTML pages with products and prices in them, and the prices change regularly.
What I would like to do is to use a plain text file with a list of the prices in (that I can easily change and upload), then the HTML pages get their prices based on a name or variable extracted from the text file.
Is this possible ?

Regards,
Sure, but not with HTML alone. You will need something like Perl to code what you want to do.

The Perl CGI module can be used to accomplish this task.

Regards,

Jeff
Oct 7 '07 #2
You might be able to use PHP, here is a tutorial for doing such a task
http://w3schools.com/php/php_file.asp
Oct 7 '07 #3
Thanks for that, but I think that's all a bit above me.
I can "tinker" and "mess about" with complete files until they do what I want, but I havn't a clue how to write a complete program from scratch.
The .php tutorial was on the right lines, but I wouldn't know how to extract certain words or numbers from a list to put them in specific positions in my .html pages.
Thanks again for your help, I think I'll just have to keep 'wandering the net' to find someone who has written a similar thing, and use that as a frame for what I need.
Regards,
Oct 7 '07 #4
Sorry, but I just had a thought........
Couldn't I use the <a> tag with name= and id= ?
Or am I on the wrong tack ?

Regards,
Oct 7 '07 #5
Sorry, but I just had a thought........
Couldn't I use the <a> tag with name= and id= ?
Or am I on the wrong tack ?

Regards,
Yes you can use the id and name attributes with an anchor
Oct 8 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
3
by: Ron | last post by:
I have a text file with the following format (pipe delimited) |column1=value|column2=value|column3=value|column4=value|... |column1=value|column2=value|column3=value|column4=value|... I have...
4
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture...
8
by: james | last post by:
I am trying to use Filestream to read a file ( .DAT) that contains values in HEX that I want to convert to text. I know the different offset addresses for each portion of the data I am trying to...
5
by: WilliamRLinden | last post by:
Hi world! we are pretty new to JavaScript and have been struggling for now 2 days on this problem ... We would appreciate mercy if anyone can give us some. Basically we are trying to simulate...
17
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? -----------------------------------------------------------------------...
3
by: WolfgangD | last post by:
Hi, I have got a prblem: I created a checkbox, this checkbox will get the informations from a text file : FileStream mem_name = new FileStream(pfad, FileMode.Open, FileAccess.Read);...
1
by: maurizio | last post by:
thank you for your answer actually i've to do some statistics (maximum,minimum,mean,standard deviation,....) of a file of data in which each column is a particular type of data. (the file is a tab...
5
by: montybytes | last post by:
Hi there, Although, I have already placed this question in the HTML/CSS section, perhaps it might be worthwhile asking the question here as well. I have a JavaScript function which retrieves...
9
vikas251074
by: vikas251074 | last post by:
I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.