Search the Community
Showing results for tags 'chapter 12'.
Found 4 results
I am working on chapter 12 and was able to connect to MYSQL database successfully, (example 12.1) But examples, 12.3 and 12.4, creating table and adding data to a table, I have problems: first,After creating a table and run the program, I don't get a message saying "The table has been created!" I get a blank screen. but if I go and check with phpmyadmin, I see a table name, columns that are created . then 2nd problem is when I run adding_data.php example, again I get a blank screen .. I checked with syntax and everything, .. I am using (localhost, llama, camel, myblog) llike in the example.. Please some one help.. thank you.
Hello, I have been working on script 12.5. which allows to set cookie's parameters. As the example in the book shows, I wanted to set cookie that expires within 1h from creation. setcookie('user_id', $data['user_id'], time() + 3600, '/', '', 0, 0); When checking the cookie after successful signing-in, Expires: always says Session. Why is that? Thank
Can someone tell me why I need to write "return array(true,$row)" on line 65 of script 12.2. The book explanation didn't help and I couldn't find much clarification elsewhere online. I understand what it does just not why I need to write the Boolean portion. Thanks!
Hello Mr. Ullman I just wanted to take a quick minute and thank you for your books, for me as a new programmer I have no words to thank you for your imparted knowledge in the books. I was working on chapter 12 and for the most part I am able to figure this stuff out. Regarding the question, I'm just not sure what I'm supposed to put in the red highlighted area in my code: // Start defining the URL... // URL is http:// plus the host name plus the current directory: $url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); is it something like: $url = 'http//mysite.com(the adress)/webhostinghub(host)/siplog(username)/publichtml(directory)... here, wouldn't I need the password? I guess the question is how specific or in a real world example how are we to fill this out. Also in the HTTP_HOST field are we to fill anything else out here? Thank you for your time and knowledge, Adan