<?php
////////////////////////////////////////////////////////////////
// PERFECT //
// ------- //
// PHP E-mail Receive Form Electronic Content Text //
// File: feedback.php //
// Version: 1.8 (April 21, 2008) //
// Description: Processes a web form to read the user input //
// and then send the data to a predefined recipient. You //
// are free to use and modify this script as you like. //
// Instructions: Go to "http://www.centerkey.com/php". //
// License: Public Domain Software //
// //
// Center Key Software * www.centerkey.com * Dem Pilafian //
////////////////////////////////////////////////////////////////
// Configuration Settings
$SendFrom = "costam";
$SendTo = "dokogol";
$SubjectLine = "Restockowa nagroda";
$ThanksURL = "Sucess.php"; //confirmation page
$_SESSION['send_to'] = $_POST['nie_wiem_jak_nazywa_sie_pole_wiec_wpisz_sam'];
// Build Message Body from Web Form Input
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= "\n" . "\n" .
$_SERVER['REMOTE_ADDR'];
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom"); header("Location: $ThanksURL"); ?>
a w kolejnym pliku:
echo 'Hej,dzieki'.$_SESSION['send_to'];