SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    Senior Webdesigner koolbrian's Avatar
    Join Date
    Dec 2000
    Location
    Mauritius
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,
    i'm was very new about php before reading kevin's tutorial and i'm still new to php after having read tutorial !. I only understood that i create tables in Mysql and show the info of the table through php in a web browser (shown in php). But this doesn't help me at all to build a database driven site. The tutorial doesn't explain you how to create a php script!,


    <php>
    ?
    ???
    ????
    ????




    ?php>?




    could u please tell me some good things about kevin's tutorial, and bad things , eventually!. Could someone tell me a "good" tutorial , learning php, ??


    Brian

  2. #2
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you read the tutorial through properly, it will make sense and and it shows you how to make a database driven site using PHP/MYSQL. That is what it is sposed to do.

    It is the best tutorial on PHP I ever read, and I had no problems at all.

  3. #3
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW,

    To start a PHP script you commonly use:

    Code:
    <?php - Normal
    <? - This is the quick way, except it must be enabled
    And to end you use:
    Code:
    ?>
    -Peter
    Last edited by petesmc; Mar 27, 2001 at 09:04.

  4. #4
    SitePoint Member
    Join Date
    Feb 2001
    Location
    El Paso, TX
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know most people here, myself included, found Kevin's tutorial to be a great learning tool. If I recall correctly, I'm not the only person who's sited it as their first experience with PHP/MySQL, but that aside, perhaps you learn in a different way then the rest of us, so check out these threads,

    http://www.sitepointforums.com/showt...threadid=19388
    Not much older then this thread, so you probably saw it, list quite a few resources for learning PHP,

    http://www.sitepointforums.com/showt...threadid=18699
    All kinds of different resources for learning PHP in a nice neat list

    and

    http://www.sitepointforums.com/showt...threadid=18836
    A discussion of PHP/MySQL books with links to an online MySQL learning tool.

    Hope you find something that helps you out

    Halsey

    oops, almost forgot,
    There's already a thread discussing Kevin's Tutuorial
    http://www.sitepointforums.com/showt...threadid=17194
    Last edited by Halsey; Mar 27, 2001 at 10:49.

  5. #5
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must say kevins tutorial is a very useful resource. When i found out about it i already knew everything it was covering but i read it all the same...and i had the impression that if you were wanting to stat learning php/mysql there couldnt be a better way to start.
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Sausalito, Ca
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I reccomend php.net and phpbuider.com. The way I started was defining what I wanted to do, and finding the functionality at php.net. The online manual is annotated by php users/wizards. So when looking at how to code the mysql_connect function for instance, it is followed by examples given by many programmers. The entire manual is laid out this way, and I can usually find out how to code something from an example given after the definition. Phpbuilder.com has many great tutorials as well as forums and a code library.

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Washington State
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A few things I don't like about this tutorial :
    Building a Database-Driven Web Site Using PHP and MySQL

    Essentially it's the use of echo with parentheses and the use of quotes. Here are some examples with the first lines being from the tutorial :
    Code:
    <?php
     echo($var1);
     echo $var1;
     
     echo($var1 . " rules!");
     echo $var1 . ' rules!';
     
     echo( "$count " );
     echo $count;
     
     echo("<P>Error retrieving authors from database!<BR>");
     echo '<P>Error retrieving authors from database!<BR>';
    ?>
    To learn about use of quotes I suggest people read this tutorial :
    http://www.zend.com/zend/tut/using-strings.php

    And if one wants to know the difference between echo and print then read this :
    http://www.faqts.com/knowledge_base/...l/aid/1/fid/40

    Lots of good information in this exaustive tutorial, it's just these two aspects that are "pet peeves" of mine especially with regards to tutorials. Btw, I fully understand hundreds of ways exist to do everything but teaching "proper" ways is a good thing. Also btw, I use the term "proper" loosly.

  8. #8
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brian
    This wenbmonkey tutorial might be a more gentle introduction. http://hotwired.lycos.com/webmonkey/...tutorial4.html . You can skim over the first few pages which talk about installing/setting up MySQL and PHP.

    Philip
    I know that what you say is technically correct - but I can't get too excited about these issues when programming in a quick and dirty language such as PHP For example, the parenthesis around the echo arguement is just a habbit for C or Java programmers.

    But, I am thankful that you lead me to the link at zend.com about strings. I did not know about "Here Document". WOW that's going to make life a little easier

  9. #9
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I learnt a lot from Kevin's tutorial.

    It has the most important things. If you read it carefully, you'll find that it not only shows you how to structure php commands:

    <?php
    // commands
    ?>

    But it also tells how to get a database driven site going - a complex one where users can submit jokes.

    Once I finished that, I used the PHP reference at http://www.php.net/manual/en/ to learn more. I still use it.

    Please read Kev's tutorial more carefully.

  10. #10
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Great link on strings. Thanks!

  11. #11
    SitePoint Addict eddiembabaali's Avatar
    Join Date
    Mar 2001
    Location
    USA, Philadelphia
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kevins tutorial is the best one i ever came across but I dont think some one just starting PHP would understand it so well or maybe am i the one that is thick ?? ?? . The webmonkey one is excellent for beginners and i rate Kevins as the best for intermediate Newbies like me ..
    cd pub \r; more beer

    Eddie

  12. #12
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Kevin's tutorial is great. It is mroe detailed for those who don't already know C or anything. I think it is hard to find any good php tutorials around. The one downfall is that there are no examples. I think it should have examples as you go along, and the complete joke script at the end.

  13. #13
    SitePoint Enthusiast pman's Avatar
    Join Date
    Apr 2001
    Location
    Planet Namek
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    new to this site...so, can someone please post a direct link to this so called "Kevin's Tutorials"??


    thanks in advance!


    NEVERMIND! I found it! Thanks anyway!
    Last edited by pman; Apr 10, 2001 at 13:14.
    in persuit of world domination...uhh..for the better!

  14. #14
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  15. #15
    SitePoint Enthusiast pman's Avatar
    Join Date
    Apr 2001
    Location
    Planet Namek
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fast response! I see that unlike the UBB, this board (vBulletin?) doesn't have an "message edited" info at the bottom of the post if edited.


    well, anyway. I found it, and thanks anyway!


    aaghh! just found out that it exists at the bottom
    Last edited by pman; Apr 10, 2001 at 13:22.
    in persuit of world domination...uhh..for the better!

  16. #16
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I write my commands like this:

    Code:
    echo($var);
    
    echo("<b>$var</b>"); // or...
    echo("<b>" . $var . "</b>");
    I never use "echo $var" really. The parentheses help me distinguish things better - to me, they indiciate either output, or a conditional. It helps things stand up, and has basically no time difference.

    Maybe I'm missing something, but the link provided didn't (from the parts I read) show me any "correct" way of doing things.

  17. #17
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also found Kevin's tutorial a bit advanced. (Sorry Kev!) I read Keith Reichley's tutorial entitled, "Jump start to easy URL's". (Do a search for it on SitePoint). Then modify his code (It is pretty easy to understand, for me at least) That is how I learned PHP.
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  18. #18
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind with my msg about examples. I found te zip file. LOL @ me, I feel stupid!

  19. #19
    SitePoint Enthusiast nguip's Avatar
    Join Date
    Apr 2001
    Location
    Malaysia
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi all,

    I'm new to php & sitepoint. Just finished Kelvin's tutorials .. I think that's a great tutorial, most probably the best on the net although I haven't go thru any other php tutorial yet.

    I'd say php is pretty easy after finishing kelvin tutorial, however just stuck someway here... I wrote the authentication script by kelvin, but I just cann't signup successfully It keep telling me that the "database for the site apears to be down".

    I double checked, and I just could see any error. Can somebody help me ? Any idea what I'm doing wrong ? (I log in using phpMyAdmin and it was working just fine.)

    BTW, I'm also having trouble with creating template like footer.php and header.php. Can someone recomment me to some tutorial on this ? Kelvin's tut just left up this part that I need.
    Last edited by nguip; Apr 12, 2001 at 00:22.
    Ngu I.P.
    Web Developer

  20. #20
    SitePoint Enthusiast nguip's Avatar
    Join Date
    Apr 2001
    Location
    Malaysia
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry...

    I solved the problem myself

    I left out the $ sign in one of the variable--$dbpass.

    It should look like this:-
    Code:
    $dbcnx = @mysql_connect($dbhost, $dbuser, $dbpass)
    	or die("The site database appears to be down.");
    But I left the $, so it's like this (not working)
    Code:
    $dbcnx = @mysql_connect($dbhost, $dbuser, dbpass)
    	or die("The site database appears to be down.");
    Typo error... So silly me...
    Ngu I.P.
    Web Developer


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
  •