Results 1 to 3 of 3

Thread: When learning PHP & MySQL...

  1. #1
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default When learning PHP & MySQL...

    Okay so it's been asked a billion times before when people come to the site and want to know how or what the best way to learn PHP & MySQL. Many books have been mentioned and many sites that go along with them.

    Well not people know who I am here yet but I have been working on a few PHP sites and slowly learning along the way. I can not write PHP yet but today I picked up a few books from the library and even bought a few from ebay. Hopefully I will pick up the basics pretty fast then get in to some more advanced things like helping people right some codes.

    As a beginner and looking at a couple of books I notice that 99% of the time it usually mentions something about installing PHP and MySQL on your machine but here is my question...

    Is it really neccesarry to install these programs to learn them? The reason I ask is fairly simple. My web host has mySQL and PHP installed on it and I host my sites through them (godaddy). So for learning, should I take the time to install the programs and build another site for learning from scratch or could I just practice and build my site at the same time without installing them and just do everything on my host site?

    Another question is this, I see a lot of people come through here, (me including) looking for help from some very awesome people. Are the codes that you guys write pretty much the same basic thing with some added extras or are they all pretty much their own thing?

    With that said I am very interested in learning php and mysql to become very helpful to others on this site.

    If you took the time to read this thanks, I hope to get some good feedback from it.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Well, I would not suggest buying another domain to test, I would just use your computer as a server using WAMP or XAMPP (search google). They come with Mysql(SQLite manager, phpmyadmin), PHP, Apeche). And that stuff..

    When you ask for help and people tell you to replace something, such as:
    Code:
    $var = "arizona";
    $state = $_POST['state'];
    if($state == $var){
      echo "You live in ".$var;
    }
    And you ask, how do I see if they don't live in arizona, someone will tell you to add:
    Code:
    else { echo "You don't live in".$var; }
    Which is an addition to the code.
    How ever, if you ask how to then redirect(if they don't live in arizona), and on the next page say thanks... Its differen't:
    Code:
    $var = "arizona";
    $state = $_POST['state'];
    if($state == $var){
      echo "You live in ".$var;
    } else {
    header("Location: thanks.php");
    }
    The highlighted is an addition, and thanks.php would basically be an addition and its own thing - as it has no effect if the person does live in arizone... Kinda confusing b.c they're basically the same thing.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    If you want to upload your files to the site every time you update them, that's fine, so long as your setup doesn't make it too cumbersome (most systems support saving directly to FTP or SFTP, but Windows doesn't seem to; if you're stuck using Windows you might prefer to develop locally, although there are a few tools that implement FTP saving themselves). However, I wouldn't recommend developing your site at the same time, because it will end up a mess. A test site would be greatly preferable, whether local or remote. Setting it up yourself might give you something of a better idea of how it all works, too.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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