Hi Ian,
This maybe a daft question (but in the line below) have you defined these 
values in an include file somewhere?

$dbcnx = @mysql_connect('localhost', 'root', 'mypasswd');

Bob E.


----- Original Message ----- 
From: "Ian R-P" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 02, 2006 3:35 AM
Subject: [php-list] Having a problem with coding from a book

> Hey everyone
> 
> Just got this book "Build Your Own Database Driven Website Using PHP &
> MySQL" May 2005 Version. I'm getting throught it slowly. I just got to page
> 74, and ran the jokelist.php(
> http://localhost/Book_code/chapter4/jokelist.php) and everytime i run it, i
> get a blank white screen.
> 
> I go to view the source and i get this coding blow the dashes:
> ---------------------------------------------------
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <title>Our List of Jokes</title>
> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
> </head>
> <body>
> ----------------------------------------------------
> It stops there and no more furthur, i've tried many things, like using past
> examples and growing off from those but still nothing. Is there something
> wrong with this coding:
> ----------------------------------------------------
> <?php
> 
> // Connect to the database server
> $dbcnx = @mysql_connect('localhost', 'root', 'mypasswd');
> if (!$dbcnx) {
>  exit('<p>Unable to connect to the ' .
>      'database server at this time.</p>');
> }
> 
> // Select the jokes database
> if ([EMAIL PROTECTED]('ijdb')) {
>  exit('<p>Unable to locate the joke ' .
>      'database at this time.</p>');
> }
> 
> ?>
> -------------------------------------------------
> It seems thats where my main problem is. I've also tried connecting to my
> database from another computer(Query Browser) and it can see everything.
> Same from my computer. All firewalls are shut off. My database is named
> ijdb.



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to