Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2004, 11:22 PM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 12, can't set up tables

I am doing this on a remote mysql, I copied everyting exactly from the download for this book but I can't get the cmstables.php to run. here is my conn.php:

<?php

define('SQL_HOST','localhost');
define('SQL_USER','xxxx');
define('SQL_PASS','xxxx');
define('SQL_DB','com_contact');

$conn=mysql_connect(SQL_HOST,SQL_USER,SQL_PASS)
or die ('Could not connect to the database; ' . mysql_error());

mysql_select_db(SQL_DB,$conn)
or die ('Could not select database; ' . mysql_error());

?>

now when I set up the database on my server it said this is my php connection string:

         $dbh=mysql_connect ("localhost", "xxx", "xxx") or die ('I cannot connect to the database because: ' . mysql_error());
        mysql_select_db ("com_contact");

and yes were all the x's are I replace them with my user name and password. I even took the above connection string and replaced
require_once 'conn.php'; with the above connection string and still nothing. I whent back into my phpadmin page checked the database called com_contact and nothing is in there, no errors just a blank page. Any suggestions?

 
Old January 7th, 2006, 04:38 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i know it´s a couple of... ehh... months ago... but!

"I am doing this on a remote mysql"

really... ? why do you use ->

"define('SQL_HOST','localhost');"

/sputnik






Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chapter 12 .MAttButler BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 5 September 10th, 2006 08:31 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Unable to set image or cursor property, Ch 12. VictorVictor BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 5 April 26th, 2006 10:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.