Jump to content
Larry Ullman's Book Forums

webstudent

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About webstudent

  • Rank
    Newbie
  1. Yes, the whole time, under http://localhost/posting.html Now I just tried it again and it works. I don't why it didn't work. (may be I had to first restart the computer)
  2. Hi, I don't know why it's not working. I can't find my mistake(s). here is what I get after filling the form: Thank you, $name, for your posting: $posting "; ?> And here is my html code: <!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>Forum Posting</title> </head> <body> <!-- Script 5.1 - posting.html --> <div><p>Please complete this form to submit your posting:</p> <form action="handle_post.php" method="post"> <p>First Name: <input type="text" name="first_name" size="20" /></p> <p>Last Name: <input type="text" name="last_name" size="20" /></p> <p>Email Address: <input type="text" name="email" size="30" /></p> <p>Posting: <textarea name="posting" rows="9" cols="30"></textarea></p> <input type="submit" name="submit" value="Send My Posting" /></p> </form> </div> </body> </html> and here is my PHP code: <!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>Forum Posting</title> </head> <body> <?php // Script 5.2 - handle_post.php //This script receives five values from posting.html: first_name, last_name, email, posting, submit) ini_set ('display_errors', 1); // let me learn from my mistakes error_reporting (E_ALL | E_STRICT); // Show all possible problems! // Get the values from the $_POST array: $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $posting = $_POST['posting']; // Create a full name variable: $name = $first_name . ' ' . $last_name; // Print a message: print "<div>Thank you, $name, for your posting: <p>$posting</p></div>"; ?> </body> </html> and I saved both in the same directory (htdocs) since the beginning.
  3. sorry Now I know why I couldn't find the password. the passward was actually 'newNEWpassword', I wrote the whole syntax as it was in the book. I didn't know I had to change 'newNEWpassword' with my new password. now it works. thank you!
  4. Yes I started it again after I tried to changed the password with "mysqladmin -u root -p password 'newNEWpassword'". So I tried again to execute the command as root with "mysql -u root -p". I got this error --> "error 1045 (28000): access denied for user'root'@'localhost (using password: YES )". I've entered any password and nothing seems to work.
  5. you're right, but as I first used "mysql" I got this error > error 1045 (28000): access denied for user'ODBC'@'localhost (using password: NO ) then after that I used "mysqlshow -u root -p password" and "mysql -u root -p", it worked both. I could acces mysql. but then comes another problem as I tried to change the password by using "mysqladmin -u root -p password 'newNEWpassword'; I then entered the configuration root user password at the prompt. now I can't access mysql anymore. I get an error like this with any password I use > error 1045 (28000): access denied for user'ODBC'@'localhost (using password: YES )
  6. Hi, I'm having a hard configurating mysql on my computer, I've already tried it 10 time after installing and uninstalling again and again. after the installation of mysql, everything seem alright because I can read: configuration for mysql server 5.6.23 has succeeded. please click finish to continue. but now when I try to get to mysql with the console cmd: c:\programme\mysql\mysql server 5.6\bin>mysql I got this: error 1045 (28000): access denied for user'ODBC'@'localhost (using password: NO ) when I try this: c:\programme\mysql\mysql server 5.6\bin>mysqlshow -u root I get this: access denied for user'root'@'localhost (using password: NO ) when I try this: c:\programme\mysql\mysql server 5.6\bin>mysqlshow -u root -p password I first get this: enter password:****** after I entered the password I gave in my configuration, I get this: Unknown database 'password' I don't know what to do
  7. Hi, On page 60 of chapter 3, after I submit the form and get the proper result, I reload the handle_form.php page and I get some errors on line15, 16, 17, 18 of the code displaying undifined index. why is that? I notice the same thing happens when I just start the handle_form page without filling the feedback.html first. why is that? why don't I just get a blank page if I didn't fill the feedback.html first? and after filling the form and submitting it, why do I get a different result with error after reloading the handle_form.php page for the second time?
  8. it works, thank you very much! now I want to know how can I do the same thing with Filezilla?
  9. Greetings, I'm a beginner. I have some difficulties with FTP configuration. I already download and started xampp, I download and started filezilla but I don't have any domain like www.larryullman.com. I use notepad++ as editor. I can't get anything from the browser (mozilla). I saved my file under C:\xampp\htdocs\phpmysql everything I get is the PHP or phpinfo() picture on page13. how should I configurate filezilla, xampp and test my script?
×
×
  • Create New...