PHP Learning suggestions...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason

    PHP Learning suggestions...

    Hello everyone.

    I have been given the task of working with PHP and MySQL at my company,
    to development some methods for our future use. The problem is, I have
    very little experience with PHP, and I need to figure out a way to
    quickly work with PHP and MySQL.

    Here is what im going to be working with.

    I need to develop a PHP web page, that will contact the MySQL database
    on the server and return specific pieces of information; rows, tables
    etc. However, i'm not sure how to get started with this.

    I know some basics with PHP (I do use Perl for Sys Admin, so some of the
    concepts are similar).

    But, can anyone recommend some books, links, tutorials etc. that can
    help me get started with this project?

    It seems daunting, but I think I just need to get started with it, and
    it will eventually be easy, with time.

    I appreciate it

    Jas
  • Guest's Avatar

    #2
    Re: PHP Learning suggestions...

    > I know some basics with PHP (I do use Perl for Sys Admin, so some of the[color=blue]
    > concepts are similar).[/color]

    Well, you are ok then... you know a little PHP and you use Perl. If you are
    strong on Perl you will have no problem with PHP.
    I can't recommend a PHP book to you ask I have two and they are not good to
    me... but that is just me because I only have on programming book I actually
    like and feel was well written for a programmer that is not a novice.

    My suggestion is get the PHP reference book. It gives you all the PHP
    features, commands, and even some config info. It is pretty good... Not the
    end all be all, but good for general use. I do suggest get you get a book
    like one of those cookbook series. I don't know if there is a PHP offering
    there, but check it out. I only say this because I think project based
    learning is good for you at this point.

    My best advice, go to sourceforge or search on the net for free code.
    Install something like the Web Based phpMyAdmin . Go into the code and pick
    it apart. Change something, break it, fix it.
    This is the only way to actually dive in and learn it. I guarantee this
    method is better than reading books. I promise.

    Good luck to you.

    --
    Wil Moore III



    Comment

    • Pedro Graca

      #3
      Re: PHP Learning suggestions...

      Jason wrote:[color=blue]
      > Hello everyone.[/color]

      Hi Jason.

      (snip)[color=blue]
      > I need to develop a PHP web page, that will contact the MySQL database
      > on the server and return specific pieces of information; rows, tables
      > etc. However, i'm not sure how to get started with this.[/color]

      Is this for a internet/intranet application?
      Do you have a webserver running?
      PHP and MySQL properly installed and configured?
      [color=blue]
      > I know some basics with PHP (I do use Perl for Sys Admin, so some of the
      > concepts are similar).[/color]

      You can do Sys Admin stuff with PHP too :)

      Beware with operator precedence ... the "or" and "||" (and maybe "&&")
      are different from the Perl ones.
      [color=blue]
      > But, can anyone recommend some books, links, tutorials etc. that can
      > help me get started with this project?[/color]

      PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


      If you need to check a function there's a real nice shortcut for its
      page: just type the function name after that URL above, like this


      [color=blue]
      > It seems daunting, but I think I just need to get started with it, and
      > it will eventually be easy, with time.[/color]

      I think so to :)

      Here's a short script to list all users defined for your MySQL
      installation:

      ========
      <html>
      <head>
      <title>User's List</title>
      </head>
      <body>
      <p>User's List</p>
      <table border="1">
      <?php

      define('DB_HOST ', 'localhost');
      define('DB_USER ', 'username');
      define('DB_PASS ', 'password');

      // connect to the database server
      $conn = mysql_connect(D B_HOST, DB_USER, DB_PASS) or die(mysql_error ());

      // execute query
      $sql = 'select user, host from mysql.user';
      $result = mysql_query($sq l) or die(mysql_error ());

      // print results
      while ($row = mysql_fetch_row ($result)) {
      echo '<tr><td>', $row[0], '</td><td>', $row[1], "</td></tr>\n";
      }

      // free resources
      mysql_free_resu lt($result) or die(mysql_error ());
      mysql_close($co nn) or die(mysql_error ());

      ?>
      </table>
      </body>
      </html>
      ========


      --
      USENET would be a better place if everybody read: : mail address :
      http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
      http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
      http://www.expita.com/nomime.html : to 10K bytes :

      Comment

      • Jon Beckett

        #4
        Re: PHP Learning suggestions...

        On Thu, 27 May 2004 11:44:01 -0700, Jason
        <jwilliams@cour tesymortgage.co m> wrote:
        [color=blue]
        >I know some basics with PHP (I do use Perl for Sys Admin, so some of the
        >concepts are similar).
        >
        >But, can anyone recommend some books, links, tutorials etc. that can
        >help me get started with this project?[/color]

        There is a pretty good book from O'Reilly that covers both PHP and
        MySQL - from memory I think it has a duck billed platypus on the
        cover.

        I used it to get started, and used the MySQL and PHP online
        documentation heavily too. The PHP online stuff is great actually
        because of the user comments.


        Comment

        • kingofkolt

          #5
          Re: PHP Learning suggestions...

          "Jason" <jwilliams@cour tesymortgage.co m> wrote in message
          news:10bcdmhaqp erv10@corp.supe rnews.com...[color=blue]
          > Hello everyone.
          >
          > I have been given the task of working with PHP and MySQL at my company,
          > to development some methods for our future use. The problem is, I have
          > very little experience with PHP, and I need to figure out a way to
          > quickly work with PHP and MySQL.
          >
          > Here is what im going to be working with.
          >
          > I need to develop a PHP web page, that will contact the MySQL database
          > on the server and return specific pieces of information; rows, tables
          > etc. However, i'm not sure how to get started with this.
          >
          > I know some basics with PHP (I do use Perl for Sys Admin, so some of the
          > concepts are similar).
          >
          > But, can anyone recommend some books, links, tutorials etc. that can
          > help me get started with this project?
          >
          > It seems daunting, but I think I just need to get started with it, and
          > it will eventually be easy, with time.
          >
          > I appreciate it
          >
          > Jas[/color]

          A couple books I read to get myself started with PHP/MySQL:

          SAMS Teach Yourself PHP in 24 Hours, by Matt Zandstra
          (http://www.samspublishing.com/title/0672326191)
          SAMS Teach Yourself MySQL in 24 Hours, by Julie Meloni
          (http://www.samspublishing.com/title/0672323494)

          They give you a good foundation in PHP/MySQL, definitely enough to get you
          started with what you're doing.

          - JP


          Comment

          • Larry Jaques

            #6
            Re: PHP Learning suggestions...

            On Thu, 27 May 2004 11:44:01 -0700, Jason
            <jwilliams@cour tesymortgage.co m> stated wide-eyed, with arms akimbo:
            [color=blue]
            >Hello everyone.
            >
            >I have been given the task of working with PHP and MySQL at my company,
            >to development some methods for our future use. The problem is, I have
            >very little experience with PHP, and I need to figure out a way to
            >quickly work with PHP and MySQL.
            >
            >Here is what im going to be working with.
            >
            >I need to develop a PHP web page, that will contact the MySQL database
            >on the server and return specific pieces of information; rows, tables
            >etc. However, i'm not sure how to get started with this.
            >
            >I know some basics with PHP (I do use Perl for Sys Admin, so some of the
            >concepts are similar).
            >
            >But, can anyone recommend some books, links, tutorials etc. that can
            >help me get started with this project?[/color]

            Any book by Julie Meloni. She has a good, clear, easygoing style.
            I started out with her first book, "PHP Essentials". It's in its
            second edition now. $24.50 here:


            I'm now starting her "SAMS Teach Yourself PHP, MySQL, and Apache in
            24 Hours" in my spare time.

            [color=blue]
            >It seems daunting, but I think I just need to get started with it, and
            >it will eventually be easy, with time.[/color]

            It is, then you get started and it gets easier...Until it turns 10pm
            and your project is promised the next day and the very last session of
            code _doesn't_quite_ work_... DAMHIKT ;)

            --
            Life's a Frisbee: When you die, your soul goes up on the roof.
            ----
            http://diversify.com Comprehensive Website Development

            Comment

            • Steven Stern

              #7
              Re: PHP Learning suggestions...

              On Thu, 27 May 2004 11:44:01 -0700 (more or less), Jason
              <jwilliams@cour tesymortgage.co m> wrote:
              [color=blue]
              >Hello everyone.
              >
              >I have been given the task of working with PHP and MySQL at my company,
              >to development some methods for our future use. The problem is, I have
              >very little experience with PHP, and I need to figure out a way to
              >quickly work with PHP and MySQL.
              >
              >Here is what im going to be working with.
              >
              >I need to develop a PHP web page, that will contact the MySQL database
              >on the server and return specific pieces of information; rows, tables
              >etc. However, i'm not sure how to get started with this.
              >
              >I know some basics with PHP (I do use Perl for Sys Admin, so some of the
              >concepts are similar).
              >
              >But, can anyone recommend some books, links, tutorials etc. that can
              >help me get started with this project?
              >
              >It seems daunting, but I think I just need to get started with it, and
              >it will eventually be easy, with time.
              >
              >I appreciate it
              >[/color]


              I started using ezSQL to wall off the SQL stuff in easy to use objects
              (http://php.justinvincent.com/). My first book was Cosentino's Essential PHP.
              The most helpful thing about it was that the examples didn't work on my system
              (because it assumes all globals are enabled). Thus, I had to study and
              reworked every example to get going. I really like Scholossnage's Advanced
              PHP.

              But what got me going was writing a few very small apps that drove web pages
              from a very simple database, displaying (or not displaying) text based on the
              date.

              Comment

              • Jason

                #8
                Re: PHP Learning suggestions...

                Thanks everyone. I appreciate your feedback and suggestions.

                What im doing right now, is using a PHP book for reference, and just
                writing code. I'm using the Zend tool right now, as I am still learning
                the syntax and all the other goodies. I just think that if I can get a
                handle on the basics of PHP, i can start writing some applications, talk
                to databases etc. which should really help me out...

                Right now, just trying to wrap my head around some of the stuff, but so
                far, it appears to be going well.

                I will keep everyone posted

                Jason

                Comment

                • Brandon Blackmoor

                  #9
                  Re: PHP Learning suggestions...

                  Larry Jaques wrote:[color=blue]
                  > Jason <jwilliams@cour tesymortgage.co m> wrote:
                  >[color=green]
                  >> can anyone recommend some books, links, tutorials etc. that
                  >> can help me get started with this project?[/color]
                  >
                  > Any book by Julie Meloni. She has a good, clear, easygoing style.
                  > I started out with her first book, "PHP Essentials".[/color]

                  I'll second that recommendation. You may also want to take a look at



                  bblackmoor
                  2004-06-04

                  Comment

                  Working...