FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Confused





whitedragon551
This stuff has me totally confused. Im looking for some more info. How does PHP work and is it easier to use the HTML. Back when I was like 13 I remember doing all my sites in HTML and now I have actually joined a few sites that are in PHP. I was interested in starting my own car club and figured that since all the other clubs Im part of use PHP and have some pretty cool features that I should be able to do it too. Any help would be appreciated.
DoctorBeaver
php is a programming language. The code is actioned before the result is sent to the user's browser.

For instance, if you want to put a welcome message on your HTML page that says "Good morning", "Good afternoon" or "Good evening" you could use php to calculate whether it's morning, afternoon or evening and then send the appropriate greeting along with the HTML code.

Let's say you extract the hour from the timestamp into a variable named $this_hour. Then you could put something like...

Code:
<p>Good
<?php   
$greeting=" evening";   
if ($this_hour<12){       
  $greeting = " morning"
else
  if ($this_hour>12 && $this_hour<18)
    $greeting = " afternoon";
}
echo $greeting."</br>";
?> 
</p>


OK, that's not the best bit of code, but it demonstrates what I mean in a way most people with a bit of programming knowledge will understand.

On 1 of my sites I use a membership system in which I store members' preferences. I use php to extract information from the MySQL database using the member's name & load the relevant content & CSS (colours, font, font size etc) for that person.

With a bit of php knowledge, especially tied in with some MySQL, you can make your site more interactive, more personalised, & more fun to visit - and that's what brings people back.
whitedragon551
I have some computer programming experience much like what you posted with the time. I was in a class in high school for that and caught on really quick.
DoctorBeaver
php is like any other programming language - it's easy to do simple things, but it can get very complex.
salman_500
html is and important language. it is because of html the php can exist. but html alone is not something that every webmaster would prefer these days. its..... err.... very dull you see... there arent many options ... its just to show stuff... but php.. its used to male stuff happen...

well if you want your car clun to flourish. if you want to know that if people are coming, or if you want people to be able to join and post comments or register or even add stuff to your site... you need php ...[/quote]
aningbo
buddy html is gone for good... lolz. not really but php is here here to stay. without php or asp, you cant go on with anything.

of course for basic website without anything but just contact forms, html will still do the trick. u still need php or asp for the contact form. unless u tell ur customers to mail u via their email accounts.
AOP Web Development
as what other said.. php is a another server scripting language.. which you can do anything to make your site more better and management.
Related topics
The Unofficial Jokes Thread
Confused
confused on phpBB
phpBB - Installation Tutorial
Career: So confused..
confused with CVS, SSH of sourceforge
I just ripped up the solaris phpbb theme!! what you think?
Confused... Adobe or Macromedia??
What if your beliefs are wrong?
I'm Confused!!!!!!! (Roman Catholic::: must read!)
So confused
What a stupid country and its system
im confused
I'm a little confused about the concept of Heaven
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.