OK, so what I'm trying to do here is create a PHP site that's driven by a database similar to this one:
http://library.digiguide.com/lib/programmenextshowing/Police%2C+Camera%2C+Action!-12578
http://library.digiguide.com/lib/programmenextshowing/House-238308

That site basically uses a PHP database and the pages are generated from the database as far as I'm aware.

I'm trying to do a similar thing, for my TV programme's fansite that I'm creating, but am not sure how to do this.

What I want to do is create a basic template, and then have the info appear from the database and the additional pages created by the database - if such a thing is possible with PHP - and the data then deleted once the programme has aired (e.g. the records remove themselves!)

Sorry if this is a bit long but I'm trying to explain it all!

Also, how do I create PHP templates properly?

All advice is appreciated! :icon_smile:

Recommended Answers

All 9 Replies

By "new to this" how new do you mean? New to this particular concept or new to PHP in general (ie. you have no idea how to access databases, print tables, etc.)?

By "new to this" how new do you mean? New to this particular concept or new to PHP in general (ie. you have no idea how to access databases, print tables, etc.)?

In reply,
I'm new to the concept of writing a database-driven site. CMS's I'm OK at, but writing a database-driven site would be more of a challenge for me, I suppose.
I'm competent at PHP, but am trying to learn some stuff so that I can make better website design rather than relying on plain HTML or using a content-management system (which the person I'm creating the fansite for doesn't want!)

Sorry for dragging this thread back up... I have tried some of the manuals suggested from a google search of "PHP website template" but they weren't quite what I was looking for.

What I am trying to do is get it to retrieve info from the database - in my case, one stored on phpMyAdmin - and then remove it after the event has happened.

Thanks

Search for php templating engine. You should find some useful information.

You can use a cron job to remove an event at a certain time.

Search for php templating engine. You should find some useful information.

You can use a cron job to remove an event at a certain time.

I'll try that. Will a XAMPP server support a cron job, or my web host (in this case, freeunlimitedweb.com)

I'm testing on localhost first, though.

i looked on freeunlimitedweb.com and they said its supported.

as for the xampp server, i am not sure. from what i know, cron jobs are os dependent. they only work on unix, but i could be wrong.

i looked on freeunlimitedweb.com and they said its supported.

as for the xampp server, i am not sure. from what i know, cron jobs are os dependent. they only work on unix, but i could be wrong.

I did have a look for PHP template scripts on Google, found Smarty but that's probably no use to either localhost or freeunlimitedweb.com - so what's recommended?

As long as its compatible with PHP 5 - 5.28 that's all that matters, and that it's easy to install.

Well you can just have records containing any information you want (titles, descriptions, date of event). When displaying the events in a category, just check the current date against the event date to see if it has already occurred. Cron jobs, as previously stated, can physically remove past events from the database every once in a while.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.