Jump to content
Larry Ullman's Book Forums

theory816

Members
  • Posts

    6
  • Joined

  • Last visited

theory816's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ahhh got it to work like that. Thanks for your guys help. Btw this is a little off topic, but I am new to php and am currently reading the "php for the web 4th addition" Im having alot of trouble trying to remember all the functions they are throwing at me in the first few chapters. Do you guys have any tips to learning php?
  2. Im not typing anything into the url. Im just clicking the html and it opens up a new browser window and I just fill it out there. This is whats in the url when I click the html file: file:///C:/xampp/htdocs/tuanphp/posting.html Uploaded with ImageShack.us Uploaded with ImageShack.us
  3. yes I made sure the apache server on xampp is on. Its still giving me that output.
  4. Yes im running these through xampp. Html <!DOCTYPE html <html lang="en"> <head> <meta charset="utf-8"/> <title>Forum Posting</title> </head> <body> <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" /> </form> </div> </body> </html> PHP <!DOCTYPE html <html lang="en"> <head> <meta charset="utf-8"/> <title>Forum Posting</title> </head> <body> <?php $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $posting = nl2br($_POST['posting']); $name = $first_name . ' ' . $last_name; print "<div>Thank you, $name, for your posting: <p>$posting</p></div>"; ?> </body> </html>
  5. Im running a simple forum post script and when I fill out the form in html and run the php script this is whats echoing out. Thank you, $name, for your posting:$posting "; ?> I dont know whats going on.
×
×
  • Create New...