Computing.Net > Forums > Web Development > converting an HTML pg to php w/Db

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

converting an HTML pg to php w/Db

Reply to Message Icon

Name: martineagle
Date: November 22, 2005 at 06:20:34 Pacific
OS: Win XP Pro
CPU/Ram: 512
Comment:

Lets say I have a page of links generated from an export of my Favourites from IE. Is there a simple way of making this into a php page with a database behind it so that I can now just put the details into the DB and it will generate my page of links?

I am hoping to keep the different categories and also for it to always generate alphabetically.

A lot to ask, but I reckon I'm not the first to want to do it. Can you help?

Thanks,
MARTIN



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: November 22, 2005 at 08:22:07 Pacific
Reply:

Since you do not know the answer to this question, I'm guessing you are not too familiar with PHP or databases. the answer is, of course, yes. Although it is fairly strait-forward, does not mean that it is a quick task (i.e. simple).

There are free content management packages out there that include this feature (PHPNuke comes to mind). But, it would be like installing Word jst for the spell check feature. There might be smaller packages out there that have the functionality.

you don't say wether this is for your personal use or if you are wanting it to display publicly on a website. That could influence the choices available to you.

Michael J


0

Response Number 2
Name: martineagle
Date: November 22, 2005 at 20:56:50 Pacific
Reply:

Michael J,

You're absolutely right, I'm not too familiar with PHP, I've only been looking into it for about 3 weeks.

Re whether this is for personal or not - it's not for personal but to be displayed publicly on a website. I am familiar with contant management packages as I've been playing around with Xoops too over the last few weeks, and it doesn't seem to offer this, or not that I could fine. It has modules that allow for listing links but it lists them in blocks with heaps of info and the data entry required in the beginning outweighs the result I'm looking for, hence this post to find something easier and better.

I understand that what I'm wanting to do may be a bit fiddly but I'm keen to learn and this will be a good little project for me. I know I'm a noob and that we always try the patience of the experienced, but thanks for your efforts and helpfulness, it's much appreciated.

Martin


0

Response Number 3
Name: Michael J (by mjdamato)
Date: November 23, 2005 at 10:45:08 Pacific
Reply:

Well, I applaud your efforts. The main difficulty is that, IMHO, trying to tackle a project that requires database integration and file manipulation (you want to read in the html pages you currently have and populate the database, right) is a bit much for a first project.

Here is my suggestion (do with it what you will). Find a content management package that has the features you want - don't be concerned with the initial setup. Once you find something that meets those needs you can modify your current HTML pages into a script that will populate the database for you.

If the package allows links to be categorized, I would expect there to be two tables - one for the categories and one for the links. After you determine and set up the categories you need to look at the table structures. The categories table will probably have an ID column - you will need to know the ID for each category. The links table will have several columns such as the linkID (which should be autogenerated), a link name, the link itself, a categoryID, and others.

Once you know the format of the links table you just need to modify your HTML pages into SQL scripts that will populate the table for you. It would look something like this:

INSERT INTO linksTableName
("linkName", "linkURL", "catID")
VALUES ("value1", "value2", "value3")

The first set of items in parens are the column names and the 2nd set are the values to insert into those columns for the new record.

Depending on how your current static HTML pages are constructed, it could be relatively easy to create the script.

Michael J


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


global vars for javascrip... Large hit site streaming ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: converting an HTML pg to php w/Db

html table out of db table using CF www.computing.net/answers/webdevel/html-table-out-of-db-table-using-cf/3303.html

PHP: HTML reponse to variable www.computing.net/answers/webdevel/php-html-reponse-to-variable/977.html

Parsing HTML using PHP www.computing.net/answers/webdevel/parsing-html-using-php/656.html