Jump to content
Larry Ullman's Book Forums

M_Gilliam

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About M_Gilliam

  • Rank
    Newbie
  1. Ok I figured it out. I didnt realize that the folders in the web root were case sensitive. So instead of "templates" I named the folder "Templates" and "css" as "CSS". As soon as I exchanged the capital letters for lowercase letters, it worked fine.
  2. ..the filenames are correct I just need to know how to make my PHP script reconize the folders in my web root, as it does the same with the downloaded sript "script08_04"
  3. Hello, I am having a problem with Chapter 8 "Creating Web Applications" pg. 195. While running my "index.php" through my web browser, I get several warning as follows: (It also happens with the downloaded script for this book "script_08_04") Warning: include(header.html) [function.include]: failed to open stream: No such file or directory in /home/content/87/8276687/html/index.php on line 11 Warning: include() [function.include]: Failed opening 'header.html' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/87/8276687/html/index.php on line 11 Welcome to a J.D. Salinger Fan Club Lorem ipsum dolor.... Another Header Lorem ipsum dolor... Warning: include(footer.html) [function.include]: failed to open stream: No such file or directory in /home/content/87/8276687/html/index.php on line 21 Warning: include() [function.include]: Failed opening 'footer.html' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/87/8276687/html/index.php on line 21 /* I created the "Templates and CSS" folders in my web root with both "header.html and footer.html" in the Templates folder and "1.css" in the CSS folder. index.php is in the web root. If I put all files in the web root It has no warnings but It doesn't incorporate the CSS file. " It doesn't look like example "D" on p. 195 " I was wondering if anyone knows what these warnings are and how to remedy the problem? Any help would be appreciated.
  4. Thanks for the quick reply Craig-UK, That was the error. Cant believe i missed that, kind of embarrassing
  5. Hello, I am have trouble in Chapter 5 Using Strings - Script 5.2 page 96. I created my php script but I cant seem to get my $last_name to "post" the last name. I get: Thank you, Manasseh last_name, for your posting: I downloaded the script for this excerise and it works but my script doesnt and I was wondering if someone can tell me what I am doing wrong. Im having a hard time distinguishing the difference between the 2 scripts. Books Script: <?php // Script 5.2 - handle_post.php /* This script receives five values from posting.html: first_name, last_name, email, posting, submit */ // Address error management, if you want. // 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>"; ?> My php script: <?php //Script 5.2 - handle_post.php // Display Errors ini_set ('display_errors', 1); error_reporting (E__ALL | E_STRICT); // Assigning Local Varibles $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $posting = $_POST['posting']; // Concantanating Varible $name = $first_name . ' ' . last_name; print "<div>Thank you, $name, for your posting: <p>$posting</p></div>"; ?> Any input would be appreciated.
×
×
  • Create New...