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.
Tue 16/09/08 at 14:32
Regular
Posts: 19,415
I don't suppose there's some kind of limit for how many of these includes I can use. I think I wouldnt need more than 10 on each page. I'm mainly using them for things like menus, header, footer and things to go in the sidebar.

Talking of the sidebar, do you think its a good idea to have an empty include? Lets say I put this at the bottom of my sidebar <?php include('temp.php'); ?> and leave the php file blank. But then I decide run a competition for a few months and put it in the temp file without having to go through all my pages and add a new code.
Fri 12/09/08 at 13:29
Regular
"Devil in disguise"
Posts: 3,151
Machie wrote:
> Is it okay if I put them all away in a separate folder? I like
> to keep everything tiny.

You can do but dont go crazy with separate folders as further down the line you might start having fun with include paths.
Fri 12/09/08 at 11:01
Regular
Posts: 19,415
Yeah sorry about that I'm terrible at explaining things ^^; I should have said a random include with each page reload. Though I would probably use it for texts+images rather than (search/newsletter) forms.

I'm about to test this php include for the first time. I wonder if I should see the php include as a way of importing code rather than a piece of the page. So for my "footer.php" do I bother with the whole " etc. and link to my css, or just a blank .php file with the code that I want to import, nothing else. I'm guessing its the latter, so all I need is to put the footer div on its own.

Is it okay if I put them all away in a separate folder? I like to keep everything tiny.
Fri 12/09/08 at 10:03
Regular
"Ctrl, Alt, Woof"
Posts: 212
if by 'rotation' Machie means a random include (from a pre-defined list) is shown after each page load then I agree that is not a big job but to cycle through several includes on a time limit without re-loading the page is a bit trickier - mind you I am by no means a pro programmer.

The cycle element of this problem also brings up the question of what to do when/if someone enters the form - it'll obviously have to stop rotating.

Remembering the last include is a simple job of adding a session var then reading it and using the value to choose the next include.

...but like i said above i didn't read Machie's request as wanting a different include per page load. I'll be interested to see if somone (for 'someone' read 'someone who know's what they are doing') can work up a solution.
Thu 11/09/08 at 21:43
Regular
"Devil in disguise"
Posts: 3,151
Machie wrote:
> Garin (or anyone else), this php include thingamajigger. Is it
> possible to have a rotating one or is that not possible?

Most things are possible, its only a matter of how many lines of code to do it. :)

The problem with genuine rotation is that you need to remember what the user saw last which isnt difficult just needs a few lines of code dotted around your site. Even easier is just random includes because its unlikely the user will notice rotation anyway.
Thu 11/09/08 at 19:59
Regular
Posts: 19,415
Aw that's okay then Jim, it's more of an added bonus really, so it wouldnt bother me if I couldnt do it ^^ Have a great holiday though, where you off to by the way? Talking of holidays this work is for a travel website of mine.
Thu 11/09/08 at 19:01
Regular
"Ctrl, Alt, Woof"
Posts: 212
## Machie - I see what you're after. It can't be done with straight php (or certainly not the rotating/cycling without a page re-load) but I perhaps it can be done with the inclusion of a bit of Java code instead). I'll look into it - but I'm going on holiday tomorrow so can't guarantee a quick response (If I take my laptop with me my missus will NOT be best pleased).

JTD
Thu 11/09/08 at 18:42
Regular
Posts: 19,415
JimTheDog wrote:
> ## Machie - what do you mean by rotating?

Hello Jim :) I was wondering if it was possible to have a rotating php include. Similiar to a rotating banner, but I want it to rotate php include files. So in my sidebar I'd want it to rotate between a newsletter sign up form and a site search. Do you know if thats possible at all?
Thu 11/09/08 at 18:10
Regular
"Ctrl, Alt, Woof"
Posts: 212
## Machie - what do you mean by rotating?
Thu 11/09/08 at 18:07
Regular
"Ctrl, Alt, Woof"
Posts: 212
I agree with Eccles in that Dreamweaver (I use DW8) creates loads of unecessary code which you can learn little from as a beginner - but only when you use the DW automated processes/wizards.

I'd also go as far to say that if you don't care about how DW creates the PHP code and you just 'want it to work' then there's no reason to avoid it either - your approach to how much want to understand what you're doing will dictate how you use DW.

If you're serious about learning PHP then the best advice I can give you as a first step is to get hold of a copy of 'PHP for Dummies'. PHP For Dummies also walks you through your first connections to a MySQL database - which Freeloa supports.

Once you understand the basics of PHP then you are able to write your own code directly into Dreamweaver - because don't forget you're also going to need a graphical web site designer for your HTML elements.

I also regularly visit an excellent site 'php.net' which gives loads of examples and code titbits for a lot of PHP functions.

I hope this helps.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

I am delighted.
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do. I am delighted.
Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con

View More Reviews

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

Go to Support Centre

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.