Jump to content
Larry Ullman's Book Forums

Cooper

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cooper

  • Rank
    Newbie
  1. Yes, that was the problem! With reverse order now it works. But it is strange... In the "create table" script I must use reverse order too and I guess (almost) everywhere with "mysqli".
  2. I've tried to remove $dbc from "mysqli_query" and "mysqli_select" (i thought that's the problem), then I get this: Successfully connected to MySQL! Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\wamp\www\PHP_for_the_web_EBOOK\ch12_4th_edition\create_database.php on line 18 Could not create the database because: . Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in D:\wamp\www\PHP_for_the_web_EBOOK\ch12_4th_edition\create_database.php on line 25 Could not select the database because: .
  3. Ok, here is the error report: Successfully connected to MySQL! Warning: mysqli_query() expects parameter 1 to be mysqli, string given in D:\wamp\www\PHP_for_the_web_EBOOK\ch12_4th_edition\create_database.php on line 18 Could not create the database because: . Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in D:\wamp\www\PHP_for_the_web_EBOOK\ch12_4th_edition\create_database.php on line 25 Could not select the database because: . The code is the same, as above... (without the @ sign)
  4. Here is the code, what i'm using: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Create the Database</title> </head> <body> <?php // Script 12.3 - create_db.php /* This script connects to the MySQL server. It also creates and selects the database. */ // Attempt to connect to MySQL and print out messag
  5. Hi! I have a question. Script 12.3 (Creating and Selecting a Database) does not work for me with mysqli_. I replace all mysql function with mysqli and it doesn't work. Why is that? (I'm using PHP 5.3.0, MySQL 5.1.36) Thanks!
  6. Hi! I think you should use session_destroy() because if you don't, the session data will remain on the server until you close the browser. But I need the correct answer too. Maybe Larry will answer us.
×
×
  • Create New...