Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About skeery2605

  • Rank
  1. Sorry about the confusion. I'm wanting to use the mysqli_oop_connect.php file for my DB connection instead of the way it tells me in 16.4. which is -----> $mysqli = new MySQLi('localhost', 'username', 'password', 'forum'); I'm not sure how to do it or if it is possible.
  2. In the 13.6 & 16.4 scripts it requires a DB connection using 13.6---> $dbc = mysqli_connect ('localhost', 'username', 'password', 'forum'); 16.4---> $mysqli = new MySQLi('localhost', 'username', 'password', 'forum'); is there any way i could make it use the mysqli_oop_connect.php instead? I'm in school and i dont like having my DB username & password on my screen like that where anybody could see it.
  3. I figured the problem i was having out.. i had to read the 13.3 again to see it. i had to enable the fileinfo.dll in the php.ini file. Everything works fine now. thanks for the help
  4. I cant get the uploader to work. I get the same error with my file or the downloadable file. Fatal error: Call to undefined function finfo_open() in C:\xampp\htdocs\lessons\chapter_13\upload_rtf.php on line 17 <!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>Upload a RTF Document</title> </head> <body> <?php #
  5. i cant use the edit button. i get "this page has been accessed in error" ive went over my code multiple times and cant seem to find any errors. ive also use the edit_users.php in the downloadable files for the book and i still get the same result. im not sure how to fix it... My CODE <?php # Script 10.3 - edit_user.php $page_title = 'Edit a User'; include ('includes/header.html'); echo '<h1>Edit a User</h1>'; if ( (isset($_GET['id'])) && (is_numeric($_GET['id'])) ) { $id = $_GET['id']; } elseif ( (isset($_POST['id'])) && (is_numeric($_POST['id'])
  6. Ive got it going now. I missed two comma. i looked over them everytime i was looking to find errors
  7. Im having trouble the script running correctly. Im getting one error on two different lines. Everything seems to be correct. This the error Im getting on line 50 and 63. (lines with errors highlighted in red) mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in.[/size] <?php # Script 10.4 - view_users.php #4 $page_title = 'View the Current Users'; include ('includes/header.html'); echo '<h1>Registered Users</h1>'; require_once ('mysqli_connect.php'); $display = 10; if (isset($_GET['p']) && is_numeric($_GET['p'])) { $pages
  8. Its been awhile since i was on here.. im still not able to get my timezone loaded im not sure how to do it at all.. im just starting in php and mysql. so chapters 1-6 in this book is as much as i now about it. if theres something i can do to get it working.
  9. mysql> SELECT message_id, subject, CONVERT_TZ(date_entered, 'UTC', 'America/New_York') AS local -> FROM messages ORDER BY date_entered DESC LIMIT 1; +---------------+---------------+-------+ | message_id | subject | local | +---------------+---------------+-------+ | 5 | PHP Errors | NULL | +---------------+--------------+--------+ 1 row in set (0.00 sec)
  10. I added all the code from the chapter until I get the problem.. I made the code red where i get the problem.. the book says if I get a null result the names of my timezones are wrong or mysql hasnt loaded timezones. CREATE DATABASE forum CHARACTER SET utf8 COLLATE utf8_general_ci; USE forum; CREATE TABLE forums ( forum_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(60) NOT NULL, PRIMARY KEY (forum_id), UNIQUE (name) ) ENGINE = INNODB; CREATE TABLE messages ( message_id INT UNSIGNED NOT NULL AUTO_INCREMENT, parent_id INT UNSIGNED NOT
  11. When i do step 8 i get a null result for local.. ive tried it multple time and i only get the null result
  • Create New...