Retrieve data from database file using id, output, serve up XML to html pages

Hi everyone,

I have 3 html pages and I would like specific content on each page to be dynamic. I would like the header text, featured image, and body text to be served up dynamically from a SQL database or Excel file.

The idea is to serve up specific headlines with corresponding images using their IDs pulled from the database/table file.

id 1 Whatever headline a    
id 2 Whatever headline b
id 3 Whatever headline c

and match it up with the featured images and body content:

id img1 Image of a cow
id img2 Image of a horse
id img3 Image of a goat

id body1 lorem ipsum blah blah content block
id body2 lorem ipsum blah blah block of text
id body3 lorem ipsum block of content

I would like to serve this data up via an xml file but I'm not sure how to do it and I need it done fast.

In basic terms, XML file should go something like this:

If display id 1 Whatever headline a
then display id img2 image of a horse
and id body3 lorem ipsum block of content

And serve up the matching content to the html pages with an XML string or something.

Will the code be simple to understand and implement? If possible, please give an example that I can test on my server in order to understand how to do it.

I don't know. Obviously I need help, I'm not a programmer. I need to understand how to do this but it needs to be done asap so this is a call for help. Your input is very appreciated!

Thank you!
imawakeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

imawakeAuthor Commented:
Can anybody offer any ideas?

Thank you!
0
imawakeAuthor Commented:
Alternatively, this data could be in the XML file and served client-side to the html pages with javascript or something. Please let me know if you can offer help in one or both methods.

Thanks!
0
twohawksCommented:
Hi iamawake, Well, since no one is daring, I will take the risk...  but I cannot provide you an "answer"...

Just so you know, the reason I did not speak up to begin with is this seems to me like either you are taking a test and want the answer, or you do not know how to conduct the most fundamental search on the internet for something very basic - and yet you want information about how to do something that is going to take you some bit of time (something you say you do not even have) to actually learn about before you can begin to tackle the problem on your own...
-- which is way beyond the scope of something like posting a question in a forum like EE,
....and personally, I do not want to become burdened portending to offer help under these conditions.

I do not mean to posture condescendingly.  I am just calling it how I see it.

That said, since you are persisting, here is what I would say to your question...

1) The very first thing anyone is going to ask is why do you want to use xml?  
The problem with even asking is you have made it clear you do not have a clue about the scope of the problem you wish to address, so I don't really want to bother answering...

2) So this brings us to asking you... have you even tried to search the internet at all??
The problem with that question is I don't think we'd see a question posed in this way if you had, so again, don't bother answering that one either....

But hey, I could be wrong...

All right, I will quit busting your nuts now and offer this...

#1 In your favorite internet search engine conduct the following searches...

simple mysql php

sql php xml

simple mysql php xml

simple html xml

On the first search I found what appears to be a great tutorial to get you started understanding the nuts and bolts of how you could create and use a simple mysql database and use php to accomplish  everything you want.  It appears like a great beginning.
http://www.freewebmasterhelp.com/tutorials/phpmysql

...I only glanced at it so I cannot ultimately vouch.. you are going to have to do some reading up with other results that catch your eye.  


If you want to do xml you will find there some great tools out there for putting together a package, and some great guides.  
I found this intersting...  http://www.ibm.com/developerworks/library/x-query2xml/
Probably not what you are looking for however.

------------------------
The bottomline is, no one can simply tell you "how to" do it from scratch without you have time to take steps in learning about these tools.  However, you say you do not have time (to learn).


Either you gotta learn it, or you are going to have to hire someone to simply do it for you.

Good luck on your journey.

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

imawakeAuthor Commented:
Thanks for the reply. I understand that what I'm asking is quite in depth and I don't mean to be asking for a perfect answer or for you to do it for me. I did look up several options specifically about client-side xml and javascript and I have knowledge of using xml with flash, but this is the first time I've attempted something like this. I'll see what I can come up with in the meantime and if I can figure out a simpe solution using javascript, xml and an access db, I should be fine.

If anyone would like to offer further input, it would be appreciated.
0
twohawksCommented:
Okay then. This helps.

My recommendation....

First, glean an overview of what is entailed working with a database for webdev.  
In the first link above there is really good primer for understanding and getting started with the mysql database, which I think you could easily be using.  The same principles apply for working with any database, so its worth going over mysql-related tuts early on (since they are so commonly written up) , and then I am sure you could sort out the access db nuances afterward, if that's what you prefer to chase down.

Second...
Since you have some familiarity with javascript asnd xml, perhaps an Ajax / XML option would feel right?

Here are some links to some decent tuts along these lines....

http://www.phpeveryday.com/articles/AJAX-MySQL-Creating-Database-P405.html

http://www.phpeveryday.com/articles/AJAX-MySQL-Creating-XML-Data-use-DOM-P406.html

http://www.tizag.com/ajaxTutorial/ajax-mysql-database.php

http://www.w3schools.com/php/php_ajax_database.asp


Overview gleaned thru these pages I think have good potential for eliciting an "aha!".
Just my two-sense.


It is typically not in alignment with EE policy to post links for answers to questions.
Considering the depth of your inquiry, however, I think an exception may be in order, so I have taken liberty to post  these links for you (in my responses) in hope it can help you quickly suss out what pathway may appear to be a suitable route for chasing down your own solution.

Honestly, go talk a light walk thru those.  Don't get bogged down in the details.  Skim thru for a general overview and see if anything sticks.

Hope this is helpful to you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
imawakeAuthor Commented:
Ok, thank you. This does help.
0
twohawksCommented:
You are most welcome, iamawake.

I am surprised you closed the question so soon.  Perhaps some others may have chimed in over the course of a couple days.

Anyway, thank you for the points assignment.  I hope you sort out a viable solution without too much trouble.

There is another option that I did not mention... Content Management System Software, or using a "CMS".
A CMS software package is like a custom development kit for dynamic site building.  
Some examples are the popular wordpress, drupal, joomla, etc...

There are CMS packages taylored for just about any coding focus you can think of.
For instance, there are xml-based cms for developers (see links below ;^)

If you are unfamiliar with CMS systems, throw your searchbar at that for a spell.


Lastly, Here are a couple other tidbits for your journey ;^)
-------------------
Build an XML-Based Content Management System with PHP (2003 - old but still handy ;^)
http://www.sitepoint.com/management-system-php/

The related discussion thread to that article
http://www.sitepoint.com/forums/showthread.php?117493-Build-an-XML-Based-Content-Management-System-with-PHP

--------------------
*A list of XML based CMS for Web Developers   ;^)
http://www.tutorialfeed.org/2009/08/list-of-xml-based-cms-for-web.html    (2009)
http://gurushala.net/xml-based-cms-for-web-developers/      (2010)

--------------------
Good Luck!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.