Results 1 to 8 of 8

Thread: PHP new

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    22

    PHP new

    Hello Everyone ,

    looking to create a database of my own. I was told to do it on PHP and mysql. I am very new at this. please explain or direct me what is the best way to start this. Where can I download both applications? Do I create the database first on mysql ? What can I do first ... Please guide me through

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP new

    (I assume you are running your own server, or a development machine, rather than using web hosting.)

    To download:

    MySQL
    Look for 5.0 'Community Server' for your platform.

    PHP
    Look for the latest version (5.2.6 at the time of writing). Get the source code tar and build if on Linux, or zip package if on Windows.

    You'll also want a web server. You can work with PHP in a console fashion, but it lends itself primarily to web pages. Apache is ubiquitous on Unix and variants, IIS on Windows, and there are others (better ones, but usually harder to set up and not as well documented) such as lighttpd and so on.

    Apache


    Linux distributions also generally have MySQL, PHP, and some web server either pre-installed or available in a repository. Use your favourite package manager if you prefer this method.


    To work with databases you will need to learn SQL. There are hundreds of tutorials for this language available on the net. There are many good SQL books published too. (I don't know of any in particular that are outstanding.) The best ones teach SQL in a platform-independent manner. Avoid the combined PHP and MySQL 'crash course'-style tutorials; they are almost universally bad.

    To execute SQL against your new MySQL installation you will use the client console. Once it is installed simply bring up a terminal window (cmd.exe on Windows, bash or similar on *nix) and type
    Code:
    mysql
    There you can execute SQL queries at the mysql prompt.


    To connect to a MySQL server using PHP, use a data access library. I recommend PDO if on PHP 5; MDB2 if on PHP 4. I also recommend to leave this step completely alone until you're comfortable working with databases and tables and creating SQL queries to work with the data. Trying to learn both PHP and SQL at the same time is unnecessarily difficult.
    Last edited by penagate; Jun 17th, 2008 at 10:01 PM.

  3. #3
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: PHP new

    Save yourself a lot of time and just install XAMPP. It sets up PHP, Apache, MySQL and other things automatically.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP new

    Yes, but I think the ground-up approach is preferable from a learning perspective.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    22

    Re: PHP new

    Thanks for the feedback everyone. I do not have my own server. I host my website through another company. Will that make a difference or am I better off building my own server? Also, If I do build my own server it would be mac based but the programming would be created on a windows machine would that make a difference? Thanks again.

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP new

    If you have a hosting account that already has MySQL set up then by all means run with that.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    22

    Re: PHP new

    Penagate,


    I just looked at hosting account at it said php support included and unlimited MySQL database . So do I still download PHP, MySQL and Apache like you mentioned on the first forum. Please explain what I need to download. Thank you

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: PHP new

    Nothing — the hosting company should have provided all of that already. Check with them on the specifics of how to access it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width