471,599 Members | 1,227 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 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 1570
numberwhun
3,503 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

Post your reply

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

Similar topics

3 posts views Thread by tornado | last post: by
4 posts views Thread by Magnus Blomberg | last post: by
3 posts views Thread by WolfgangD | last post: by
1 post views Thread by maurizio | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.