Lay My Hat home page Lay My Hat Forum
The forum for holiday rental owners


 
  FAQFAQ    SearchSearch    MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in 

PHP and SQL

 
Post new topic   Reply to topic    Lay My Hat Forum Index ->
How to build your own personal website from scratch
View previous topic :: View next topic  
Author Message
Alan Knighting



Joined: 18 Oct 2004
Posts: 4170
Location: Monflanquin, Lot-et-Garonne, France

PostPosted: Mon Oct 16, 2006 8:28 pm    Post subject: PHP and SQL Reply with quote

I think I can see very good reasons for the use of CSS when creating and maintaining a personal Web Site but I don’t understand why one would use PHP or SQL when creating a personal Web Site.

Is there any reason for wanting to create Web pages on the fly in a personal Web Site?

Is there any likelihood of needing to access databases in a personal Web Site?

Can anybody explain?

Fluffy
Back to top
View user's profile Send private message
vrooje



Joined: 09 Dec 2004
Posts: 3263
Location: Burgundy, France

PostPosted: Mon Oct 16, 2006 8:53 pm    Post subject: Reply with quote

I create pages on the fly because:

1) I have a printable version of my site, and every time I change some small fact on one version, I'd like it to automatically change on the other, and plus I don't want to create a ton of printable pages. It's somewhat non-standard, but I just have print.php, which creates the page based on the specified include, e.g. print.php?page=index prints the index, print.php?page=faq prints the FAQ, and print.php?page=all prints the entire site.

2) Likewise with my image display utility -- I have one page that can display any image, rather than a bunch of individual pages that each display one. If I change my address or something, it automatically changes on all pages. Though, in fairness, I think HTML can do includes without needing PHP. I've just never done it.

I need a MySQL database because:

1) I have my own booking calendar in an administrative section of the site, which is what I use to keep track of all of my bookings. I use that database to display an availability calendar to the public, which I can totally customize to suit my page. Because the calendar directly tracks my own booking calendar, my availability calendar is guaranteed immediately accurate, not "hopefully it's been updated sometime this week."

2) I also use this database to keep our property managers informed about what guest is arriving when, and they also have access to my notes about the client, e.g. "Mr. and Mrs. Smith will be arriving very late on Saturday night, so there should be time to fix the drippy downstairs faucet; they have requested a mid-stay tidy the following Saturday." I keep it updated with the latest from the client, and they check it on their schedule, and everybody's informed.

3) Eventually I am going to add an accounting table to the database, too, so that my booking "web software" can keep track of more than just weekly price and weekly expenses attached to a particular client.

I think you're generally right, that most personal pages have no need for PHP (or any of the other scripting languages like ASP or JSP) and certainly no need for SQL in any form. But, for me personally, my site is more than a typical one -- it's also my management assistant! Smile
_________________
Brooke
Back to top
View user's profile Send private message
Alan Knighting



Joined: 18 Oct 2004
Posts: 4170
Location: Monflanquin, Lot-et-Garonne, France

PostPosted: Mon Oct 16, 2006 10:02 pm    Post subject: Reply with quote

Brooke,

Thanks for that. Lot's of good ideas and all presented clearly, as usual.

Food for thought!

Fluffy
Back to top
View user's profile Send private message
giofed



Joined: 22 Feb 2006
Posts: 37
Location: Tuscany

PostPosted: Thu Nov 23, 2006 2:07 am    Post subject: Reply with quote

One important thing, though.

Remember, when building the website, to implement it with MOD_REWRITE, and make the dynamic URLs friendly (there are programs that do that...)

Static pages are adviceable, though. If you have less than 50 pages (most personal websites do) you can manage it without a database. And SE still prefer static websites, it will change, though.
_________________
I love to blog for http://forum.thriftytuscany.com/
Back to top
View user's profile Send private message Visit poster's website
debk



Joined: 25 Sep 2004
Posts: 1056
Location: Lisbon, Portugal

PostPosted: Thu Nov 23, 2006 8:00 am    Post subject: Reply with quote

I'm interested in adding php mostly for the reasons described by vrooje in #1 and #2.
debk
_________________
Historic Lisbon Apartments & Holiday Rental Homes
Back to top
View user's profile Send private message Visit poster's website
george



Joined: 25 Jan 2007
Posts: 9
Location: Agios Nikolaos, Crete

PostPosted: Thu Jan 25, 2007 5:57 pm    Post subject: Reply with quote

Hi

You can use a database for all manor of things and to be honest it's very rare for me to build a web site now without using a DB.

For example, if you build your own personal web site and it pulls the content from a database then it makes it very easy to update it when you're not at your PC - you can access any PC with the Internet and login to your own web back end and update your site. Great if you're on the move alot.

I'd agree that not everyone needs to have a DB driven web site - it can get quite complex and they're slower to build but you can be quite clever with them and automate a lot of mundane tasks.

Just my two pence worth Smile

George
_________________
VRBO Resources
Back to top
View user's profile Send private message
Garri



Joined: 11 Jul 2005
Posts: 1717

PostPosted: Thu Jan 25, 2007 10:44 pm    Post subject: Reply with quote

... and let's not forget that php/mysql is the bedrock of some of the most popular blogging tools such as Wordpress.

adapting a blogging tool or using a cms to run a personal site is a no brainer in my opinion.

to change the content you'd otherwise have to wade through html code to change or update your content. that's really tedious at best of times.

using a database with php allows you to separate your content from the structure (html) and css (presentation). it streamlines the process and makes it very easy to maintain.

using a blogging tool to run a personal site gives you the benefit of having a mysql/php system (depending on blog) without really thinking about it: it's all laid on!

the benefits:

- it gives you clean urls (permalinks) right out of the box.

- semantically structured (search engines understand sites like this better, and less overhead for their robots)

- it gives you a booking enquiry system if you set up your commenting system with that in mind, similarly a guestbook system.

- ability to add and categorise complimentary info to your site such as local attractions, reviews of restaurants, places to visit. people may visit your site through searching for these things.
(once you've set this up it's unbelievably easy to maintain - just add stuff when you come across it and build relevant, complimentary content for your site)

- ability to stream in photos from your *Flickr account (maybe not all your photos on Flickr, just some. In that case tag the photos you want streamed into your site and how many)

- build a useful links page and categorise them - EASILY!

there's probably 101 other benefits but I'm cream-crackered Wink


* Flickr: that's a whole other ball of wax. utilising social-media sites such as Flickr seems like a good idea as today I did a search on Noordhoek Beach (South Africa) and was pleasantly surprised to see someone's Flickr account (profile) show up high in Google's results (page 2). The person had 'tagged' their photos specifically (gave the search engines loads of juicy meta data to work from).

I'll tell you why I was pleasantly surprised another time.
_________________
Birdbox Media
Back to top
View user's profile Send private message
Alan Knighting



Joined: 18 Oct 2004
Posts: 4170
Location: Monflanquin, Lot-et-Garonne, France

PostPosted: Thu Jan 25, 2007 11:03 pm    Post subject: Reply with quote

Garri,

That's OK but I'm "flogging" not "blogging". What I'm flogging is not changing by the minute, except for its availability.

I'm sure they’re all wonderful in their own right but having a relatively static Web Site doesn’t involve PHP or MySQL or Apache, it doesn’t even involve CSS.

In my opinion it’s horses for courses and one doesn’t need a Grand National winner to pull a milk float unless one wants to be “the fastest milkman in the West”.

Fluffy
Back to top
View user's profile Send private message
Garri



Joined: 11 Jul 2005
Posts: 1717

PostPosted: Thu Jan 25, 2007 11:16 pm    Post subject: Reply with quote

flogging and blogging are one and the same thing. there will come a time when all websites will actually be blogs.

I saw a Textpattern (blog) template which was designed for static site. A beautifully simple and elegant template that would be suitable for a private rental site. change the colours in the css file and away you go. Boom! neat little website, semantically correct, clean urls, for how much? Absolutely nothing!

static is the new dynamic! Wink
_________________
Birdbox Media
Back to top
View user's profile Send private message
Alan Knighting



Joined: 18 Oct 2004
Posts: 4170
Location: Monflanquin, Lot-et-Garonne, France

PostPosted: Thu Jan 25, 2007 11:45 pm    Post subject: Reply with quote

Garri wrote:
flogging and blogging are one and the same thing. there will come a time when all websites will actually be blogs.

That's like saying rhubarb is a fruit and there will come a time when all fruit is rhubarb.

Fluffy
Back to top
View user's profile Send private message
Garri



Joined: 11 Jul 2005
Posts: 1717

PostPosted: Fri Jan 26, 2007 12:06 am    Post subject: Reply with quote

Quote:
That's like saying rhubarb is a fruit and there will come a time when all fruit is rhubarb.


Dunno about that, I hope I'm not around should that happen Wink

There is a growing trend of normal websites becoming blogs, for all of the reasons I mention above and when you chuck RSS (blogs have that tech built in) on to the pile then you can see why it is making sense (more sense than I'm probably making)
_________________
Birdbox Media
Back to top
View user's profile Send private message
mayenne53



Joined: 10 Mar 2007
Posts: 7
Location: Mayenne (53) near Laval

PostPosted: Mon Mar 12, 2007 8:06 am    Post subject: Reply with quote

I am trying to get my new website developed (by myself), I have apache installed (using XP Home), have mysql and phpmyadmin, but I cant get mysql configured? Are there any simpler ways to use a database other than trying to get a server set up on home pc? I have webspace with MySQl & phpmyadmin available, and I also have a database prepared - how can I get the database uploaded then retrieve the data from it?
Back to top
View user's profile Send private message
Garri



Joined: 11 Jul 2005
Posts: 1717

PostPosted: Mon Mar 12, 2007 8:46 am    Post subject: Reply with quote

Mayenne, it depends on how good your hosting company is. My host is Dreamhost.com and their admin makes it easy (too easy) to create and configure a mysql db. It's all laid on.

The process takes 10 minutes but actually takes me a fraction of that as all I need to do is give it a name, tell it which domain I want it on, give it a password, verify password and click go!

As all my sites are blogs I just tell the blog which database to use, as I've already set it up on my server.

I could use phpmyadmin to access the db, but I've needed to.
_________________
Birdbox Media
Back to top
View user's profile Send private message
vrooje



Joined: 09 Dec 2004
Posts: 3263
Location: Burgundy, France

PostPosted: Tue Jun 26, 2007 10:48 pm    Post subject: Reply with quote

In the interest of keeping things cross-referenced...

We are discussing adding a scanned-in guestbook to a website on another thread, which is another way PHP would come in handy.
_________________
Brooke
Back to top
View user's profile Send private message
tomo28



Joined: 23 Sep 2007
Posts: 5
Location: tenerife

PostPosted: Tue Sep 25, 2007 10:31 pm    Post subject: mambo Reply with quote

our host provides a script called fantastico with mambo,joomia and other content management sites. I finaly went with joomia as it starts basic and you just bolt on services as and when you need them and they are free
_________________
a dwarf on the shoulder of a giant can see for miles
http://www.sanandrestenerife.co.uk
http://www.lasadelfas2.co.uk/
http://www.holiday-rentals.co.uk/p86092
http://www.ownersdirect.co.uk/canaries/C1337.htm
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Lay My Hat Forum Index ->
How to build your own personal website from scratch
All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group