SitePoint Sponsor

User Tag List

Page 6 of 8 FirstFirst ... 2345678 LastLast
Results 126 to 150 of 184
  1. #126
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just recieved my book! Looks good!
    Worth every penny!

    -Dan
    -Daniel Kerton,
    Humor

  2. #127
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anybody know of a free host that suports PHP and SQL so i can practise?

    -Dan
    -Daniel Kerton,
    Humor

  3. #128
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are on eithe Windows or Linux you can practice on your own machine! Follow Kev's instructions in Chapter 1 on setting both PHP and MySQL up. If you're running Windows, chances are you have access to Microsoft's Personal Web Server or IIS, however if you wish to install the Apache webserver for your own use, KEv's given instruction on doing that too!

    Good luck.

    Sketch
    Aaron Brazell
    Technosailor



  4. #129
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    My sentiments exactly, Sketch.

    -Kev.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  5. #130
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having problems connecting to a MySQL data base as described in pages 52-54.

    My code (no password for security reasons)____________

    <?php
    mysql_connect("localhost", "daniel", "pass");
    $dbcnx = mysql_connect("localhost", "daniel", "pass");
    $dbcnx= @mysql_connect("localhost","daniel","pass");
    if (!dbcnx) {
    echo("can't connect to database server");
    exit();
    }
    mysql_select_db("jokes", $dbcnx);

    if(! @mysql_select_db("jokes") ) {
    echo( "unable to locate jokes database");
    exit ();
    }
    mysql_query(query, connection_id);
    ?>
    ______________________________________________________

    File called connect.php

    -Dan
    -Daniel Kerton,
    Humor

  6. #131
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I purchased using paypal how can i access the code archive?

    -Dan
    -Daniel Kerton,
    Humor

  7. #132
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Dan,

    The code you posted has a very obvious problem -- you're trying to connect to the MySQL server 3 times. You can't just blindly type the code from the book in; you need to read my explanations that appear between them. I began by showing this line:
    PHP Code:
    mysql_connect("localhost""daniel""pass"); 
    Then I explained that the mysql_connect function returned a connection ID that we needed, so the updated line would look like this:
    PHP Code:
    $dbcnx mysql_connect("localhost""daniel""pass"); 
    And finally I explained that we could suppress the ugly PHP error and display our own more friendly one in the case of a connection error by using the @ sybmol and an if statement, making the final connection code:
    PHP Code:
    $dbcnx= @mysql_connect("localhost","daniel","pass"); 
    if (!
    dbcnx) { 
      echo(
    "can't connect to database server"); 
      exit(); 

    You only need to type this last code fragment -- the first two were just steps on the way to this final code.

    As for the code archive, drop me a line via email and I'll set you up.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  8. #133
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How many books have you now sold?

    Or is that secret, like if you told me you'd have to kill me?
    I swear to drunk I'm not God.
    » Matt's debating is not a crime «
    Hint: Don't buy a stupid dwarf ö Clicky

  9. #134
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Maybe not kill you... but I might get you to clean my bathroom.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  10. #135
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for clarifying that Kevin,

    I've sent you an email.



    -Dan
    -Daniel Kerton,
    Humor

  11. #136
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK i'm really lost now i'm trying to connect to my localhost mySQL database heres my code:
    _______________________________________________
    <?php

    $dbcnx= @mysql_connect("localhost","daniel","pass");
    if (!dbcnx) {
    echo("can't connect to database server");
    exit();
    }

    mysql_select_db("jokes", $dbcnx);

    $result = @mysql_query("select joketext from jokes");
    if (!result) {
    echo("<p>error performing query: " . mysql_error() . "<p>");
    exit();
    }
    ?>
    _______________________________________________

    All i get is a blank screen is my code right.
    Last edited by Dan_K; Jan 8, 2002 at 18:54.
    -Daniel Kerton,
    Humor

  12. #137
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Looks fine to me. Where's the code to actually output someting on the page?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  13. #138
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thinks Kev's hit the nail on the head there. If you just run that script....and it works...the result would be a blank page...
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  14. #139
    K, Dan K Dan_K's Avatar
    Join Date
    Jun 2001
    Location
    Perth - Western Australia
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah i fixed it now, i'm starting to understand the code more.


    -Dan
    -Daniel Kerton,
    Humor

  15. #140
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best book I've read

    Just a quick note to Kevin.

    I'd just like to say a big thank you for your excellent book. This is by far the best book on PHP and MySQL I've read (and I have read it a couple of times now - I'm sad I know!)

    Finally someone has shown an example of php being used in a (semi) realistic environment and the tricks of the trade. Congratulations and keep up the work. If you ever expand on the book then count me in!!

    Again, well done!
    Martin

  16. #141
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the kind words, Martin!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  17. #142
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    St. Louis, MO
    Posts
    212
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am very close to buying this book, but I don't like the way the code is formatted. I find it hard to read when the braces don't match up.

  18. #143
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I assume you mean the difference between this indenting style
    Code:
    if (condition) {
      // code here
    }
    and this one
    Code:
    if (condition)
    {
      // code here
    }
    Both styles have their proponents, but the former was chosen for the book for its compactness, so as to be able to fit more code on a single page of the book.

    I understand if you prefer the latter style (we've actually standardized on it here at SitePoint), but it hardly seems like a reason not to buy a book...
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  19. #144
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just want to let anyone who doesnt have the book know that it is really good for beginners! Ive only read the first few chapters so far but ive learned more than trying to over the internet. Shipping was fast too.

    Congrats Kevin!
    Wavelan

  20. #145
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Montreal, Canada
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't buy the book - not yet -, but I will say that Kevin as a technical writer rocks and that his articles are among the best I've read so far.

    Hey Kev, you're from Montreal, parles-tu français un peu?

    Mike
    Dis donc, qu'est-ce qu'il dit ce mec? Hein? Je comprends rien...

  21. #146
    SitePoint Guru
    Join Date
    Jun 2001
    Location
    Australia
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kevin, Just to let you know, your book has been shown in Intenet.au magazine on page 19.

    Nice rap

  22. #147
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Mais oui je parle Français, mais ça fait longtemps depuis que j'ai utilisé mon Francais à tous les jours. J'en ai perdu beaucoup durant les trois ans que j'ai habité en Australie.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  23. #148
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by kyank
    Mais oui je parle Français, mais ça fait longtemps depuis que j'ai utilisé mon Francais à tous les jours. J'en ai perdu beaucoup durant les trois ans que j'ai habité en Australie.
    I think you're posting in the wrong thread here, Kev
    I swear to drunk I'm not God.
    » Matt's debating is not a crime «
    Hint: Don't buy a stupid dwarf ö Clicky

  24. #149
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No, I was answering ALSLG, who wrote:
    Hey Kev, you're from Montreal, parles-tu français un peu?
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  25. #150
    SitePoint Zealot
    Join Date
    Jul 2001
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the book about basic php and MySQL or more advanced stuff or just mainly Basic MySQL?
    I want to setup a site using php and MySQL with these features: Users submit content, admins delete, edit, or post content, Member login, Some pages require a password, and that's about it. Probably pretty basic stuff, but I don't know php or MySQL.
    I'll probably get kev's book, but any other books I should look into buying?


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
  •