GetDotted Domains

Viewing Thread:
"Should I be using php?"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 04/09/08 at 17:31
Regular
Posts: 19,415
I mastered HTML and CSS (kinda), but I never really got into php despite owning a few books.

When I create a site I can change pretty much anything with CSS, but if I want to change big chunks of the site layout I have to alter every single page which is not good. So my question is, should I have studied php all those years ago? Is there anything out there that can do all this form me for free so I dont have to change 100s of webpages individually? Or maybe there's a new programming language in development thats better than ASP and PHP, in which case should I start learning now?

Its okay, this wont affect my current site, but I need to know for future projects. Freeola is done in php right? it cant be that difficult. Could I be able to master it within a week?

Thanks for your help guys, I appreciate it.
Mon 08/09/08 at 20:13
Regular
Posts: 19,415
If its that simple why couldnt I find it when I was googling for an hour :/

Thank you very much Garin. Although I just realised, is this set to my server clock or my computer clock? My server is in California, but I want it set to GMT. Is that possible do you know?
Mon 08/09/08 at 19:37
Regular
"Devil in disguise"
Posts: 3,151
<?php echo date('l F j, Y');?>
Mon 08/09/08 at 19:27
Regular
Posts: 19,415
Does cjh still post on the forum? I need a php script to post the current date in this format "Monday September 8, 2008" so I dont have to keep changing it manually :)
Fri 05/09/08 at 12:51
Regular
"Devil in disguise"
Posts: 3,151
Machie wrote:
> Maybe I should write a beginners guide to php as I learn it.

I started writing one once upon a time, a totally thankless task. :) I always thought cjh's beginners guide was pretty good. A cut above everything I could write for certain.
Fri 05/09/08 at 11:09
Regular
Posts: 19,415
Well spotted Garin :) I miss Dr Jo, it's a shame he/she decided to leave :(

Maybe I should write a beginners guide to php as I learn it.
Thu 04/09/08 at 23:42
Regular
"Devil in disguise"
Posts: 3,151
If you look in the hints, tips and tutorials thread theres a link to a topic on this subject.
Thu 04/09/08 at 20:15
Regular
Posts: 19,415
That's some good advice, thank you McLong :) I'm already doing some tutorials and learning a bit of php. As long as I have the site structure the way I want it, I wont have any problems changing everything I need with php include. ^^
Thu 04/09/08 at 19:58
Regular
Posts: 791
I'd be very surprised if most web developers with websites of a fairly substantial size don't use this tactic. It's pretty common knowledge as far as I'm aware.

And if you wanted to move a sidebar from the left to the right, then it's entirely possible, it just means that you'd have to update every page where you wanted it to happen. This could potentially take ages, but then in effect it's similar to a site re-design, which will always take a while to implement.

I recommend being entirely happy with your site layout before you put it all together!
Thu 04/09/08 at 19:18
Regular
Posts: 19,415
McLong I could kiss you. I didnt know it was that simple. It seems too good to be true, are you sure this is standard and what usually goes on?

Hmm it would make my job a lot easier but what if I wanted to move a sidebar like that one <- from the left to the right -> I wouldnt be able to do that in includes, I dont think :/ oh wait what if the whole page was an include like a template :) okay perhaps not

I'll do some research now and find out more. Thanks a bunch McLong :D
Thu 04/09/08 at 18:03
Regular
Posts: 791
It depends on what you're trying to achieve. A PHP include is a must-have if all pages on your site are of a very similar layout.

For example, the footer at the very bottom of every page ('Contact Us | Help & Support' links etc) on our interactive sites is exactly the same on every page, so therefore that part of the code, including the closing table, GetDotted search box and any other odds and sods is created in a separate file and then simply 'included' on all pages that need it. Therefore any changes that need to me made to any part of that section require only one file to be updated.

It's easy to do this, and if includes are all you need you don't need much knowledge of PHP at all. You only need to do the following:

1. Create a new file called something relevant to the code you will be creating, for example footer.php or navigation.html

2. Add the code that you wish to include to this file.

3. On the pages that you wish to include this file just type <?php include('footer.php'); ?> exactly where you want this include to appear. Your files will need to have a .php extension for this include code to work though.

-------------------------

I believe .ASP is for use on Windows servers, and PHP for Linux servers. I've never used ASP, nor do I want to.

And I doubt very much you'd be able to learn PHP in a week!

Hope this helps...

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

The coolest ISP ever!
In my opinion, the ISP is the best I have ever used. They guarantee 'first time connection - everytime', which they have never let me down on.
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.