Jump to content

Fall0ut

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Fall0ut's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. like so far i have this for the HTML doc SAVED AS "THEFORM.HTML" _________________________________________________________ <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="formsender.php" method="get"> User Name: <input name="user" type="text" /> <input type="submit" /> </body> </html> _________________________________________________________ and this for the PHP doc SAVED AS "FORMSENDER.PHP" _________________________________________________________ <?php $posts = ''; $gets = ''; function logPost($value,$key) { global $posts; $posts = $posts . " !!===!! " . $key . " = " . $value; } function logGet($value,$key) { global $gets; $gets = $gets . " !!===!! " . $key . " = " . $value; } array_walk($_GET,"logGet"); array_walk($_POST,"logPost"); mail("my@emailhere.com","emailsubjecthere","POST:\n\n{$posts}\n---------------------------------\nGET:\n\n{$gets}\n\nEND OF EMAIL"); ?> _________________________________________________________ also tried the PHP doc like this _____ <html> <body> <?php $posts = ''; $gets = ''; function logPost($value,$key) { global $posts; $posts = $posts . " !!===!! " . $key . " = " . $value; } function logGet($value,$key) { global $gets; $gets = $gets . " !!===!! " . $key . " = " . $value; } array_walk($_GET,"logGet"); array_walk($_POST,"logPost"); mail("my@emailhere.com","emailsubjecthere","POST:\n\n{$posts}\n---------------------------------\nGET:\n\n{$gets}\n\nEND OF EMAIL"); ?> </body> </html> ____
  2. Ok so to make that PHP document all I have to do is go into dreamweaver create an HTML document and paste that code in change the email and subject then save it as a PHP document? So far I did that, I have one document that has the HTML the other with PHP I went on Freewebs, created a site to test it out online. Then I uploaded the HTML doc and then the PHP doc. I open up the HTML i can see the form but it says at the top "This form is inoperational!"
  3. Hey thanks for that pocobueno it cleared some stuff up but like I still problems. When I preview the HTML document in a web browser, it shows the text field, lets me write text into it, but when i hit the submit button, instead of showing me the inputted information, it takes me to a blank page were it lets me download the form_handler.php document..
  4. Ok so basically I am doing this subscribe thing for a newsletter on my site The person inputs his email into the textfield, clicks submit... then the email gets saved somehow. Dont exactly know I found this code on wikipedia _____________________________________ form.html <html> <body> <form action="form_handler.php" method="get"> User Name: <input name="user" type="text" /> <input type="submit" /> </form> </body> </html> _____________________________________ form_handler.php <html> <body> <?php /* * This will print whatever the user put into the form on the form.html page. */ $name = $_GET['user']; echo "Hello, ". $name ."!"; ?> </body> </html> _____________________________________ I just dont exactly know what to do with the PHP I dont exactly understand how the HTML part knows were to send the inputed information Please help out! Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.