Starting Out With PHP

Discussion in 'Web Design and Development' started by MadDoc, Aug 15, 2007.

  1. MadDoc macrumors 6502

    MadDoc

    Joined:
    Apr 25, 2005
    Location:
    UK
    #1
    I am trying to learn how to develop web applications using PHP and MySQL. I have a strong background in REALbasic and (in my pre-Mac days) VisualBASIC. It's a steep learning curve but I shall persevere.

    I am currently using this book as my reference text.

    I have a few questions:

    1. How do I set up PHP and MySQL on my MacBook Pro (OS X 10.4.10) so that I can test scripts offline? Are there any walkthroughs for beginners?

    2. Can anyone recommend a good editor for PHP with syntax colouring, etc.

    3. What HTML editor do people recommend?

    Many thanks,

    MadDoc
     
  2. MacDonaldsd macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #2
    for question 2&3

    I use Textmate, they have a 30 day trial for it.

    Does nice color coding for PHP/HTML and doesn't get in the way of developing.
     
  3. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #3
    1. MAMP might be the easiest way of getting a full PHP/MySQL environment up and running in no time...

    2 and 3. Both PHP and HTML are text only, so all you need is a nice text editor. My favourites are: The free TextWrangler (along with Cyberduck if you need an alright free s/ftp client) or the $79 Coda ($69 if you already own Transmit, a very nice s/ftp client costing $29).

    Now, that should get you started.

    Oh, and of course feel free to browse around the Web Design and Development forum for more tips and information.
     
  4. dataset macrumors member

    Joined:
    Jun 27, 2007
    Location:
    La Mirada, California, United States Of America
    #4
  5. MadDoc thread starter macrumors 6502

    MadDoc

    Joined:
    Apr 25, 2005
    Location:
    UK
    #5
    Thanks for the great tips guys.

    I've taken a look at MAMP and am downloading it - it seems to be exactly what I am looking for. What I am unclear about is that it talks about setting up a local server? I'm not quite sure about what this entails. I just want to be able to run local php files on my computer in my browser window. Why do I need to set up some form of server? (You can tell I am only just starting out in the world of web development!).

    I really like the look of coda - it seems like a beautiful app. I will download the trial and see how I get on with it.

    MadDoc,
     
  6. dataset macrumors member

    Joined:
    Jun 27, 2007
    Location:
    La Mirada, California, United States Of America
    #6
    When it sets up a local server this means that anyone on your lan (local area network) can access it. Basically, other people on you LAN can see the websites you're working on by typing your local IP address into their browser window.

    As far as I know, the only way to not let other people access the site from the lan is to add a password, but I am not completely sure about the solution.

    To access the site from your machine http://127.0.0.1 should work
     
  7. thejadedmonkey macrumors 604

    thejadedmonkey

    Joined:
    May 28, 2005
    Location:
    Pa
    #7
    The output, or to get data from a database, it needs to be parsed. to do that, it needs to go through the server. Straight up HTML can just be read from disk, but PHP needs to be read by a browser from the server, otherwise it'll read and try to output PHP as thought it is HTML.
     
  8. pengu macrumors 6502a

    Joined:
    Mar 20, 2005
    Location:
    Diddily Daddily...
    #8
    just remember, when we say "set up the server" we mean setup the Apache/PHP/MySQL server SOFTWARE, we don't mean a physical server.

    and for the coding, i'd recommend Komodo Edit to start off (free) and when you get a bit more experienced, Komodo IDE will be of benefit to you (license)
     

Share This Page