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 November 23rd, 2009, 02:59 PM
Registered User
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Creatmovie, moviedata, select.

Dear Frineds

this is my first post at the wrox website and i was hoping that some one out there could help me in this problem.

i have created the creatmovie, moviedata files and it was runing fine i checked the database from the commond line(DOS) and it was there. however, when i tried to run the code using select.php the browser came back with an empty page no any error message is there i simply cant see any thing. i was wondring what is the problem.

this is the code for the select that i used:
<?php

// Connection String

$connect= mysql_connect("localhost","","")or
die ("hey losser you can not Connect to the database");



//confrming that this is the right database

mysql_select_db("salim0");


$query="SELECT movie_name, movie_type
FROM movie
WHERE movie_year>1990
ORDER BY movie_type";

$result=mysql_query($query) or die(mysql_error());

while($rows=mysql_fetch_assoc($result)) {


foreach($rows as $vall){
echo $vall;
echo " ";
}
echo "<br>";

}

?>
 
Old December 28th, 2009, 01:32 PM
Registered User
 
Join Date: Dec 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

goodboy-

change this code:
Code:
$connect= mysql_connect("localhost","","")or
to this code:
Code:
$connect= mysql_connect("localhost","root","")or
you need to provide php with 3 pramiters: [server][user][password] if you installed mysql with default settings there is no password so you need to put "" in it's place.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up createmovie.php, moviedata.php ephemera BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 December 28th, 2009 01:24 PM
createmovie.php and moviedata.php larajo BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 4 December 28th, 2009 12:49 PM
Select row in GridView WITHOUT using Select button rao965 ASP.NET 2.0 Professional 1 February 15th, 2008 10:44 AM
Fill select box and select recordset value markd Classic ASP Databases 1 February 20th, 2006 06:41 PM
select="node1", select="node2"... Baldo XSLT 7 March 12th, 2004 10:38 AM





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