Sending Form Data Via Email
<?php
require_once 'stripFormSlashes.inc.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Forms</title>
</head>
<body>
<?php
if (isset($_POST['Submit']) &&
isset($_POST['fieldname']) &&
trim($_POST['fieldname']) != '' &&
$_POST['groupname'] != '') {
echo '<h1>Thank you for filling out this form!</h1>';
$text = '';
foreach ($_POST as $name => $value) {
if (is_array($value)) {
$text .= sprintf("%s: %s\n", $name, join(' ', $value));
} else {
$text .= sprintf("%s: %s\n", $name, $value);
}
}
// UNCOMMENT THE FOLLOWING LINE TO USE ON YOUR SITE
// mail('recipient@domain.tld', 'Form data', $text);
} else {
?>
<form method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>">
<input type="text" name="fieldname"
value="<?php
echo (isset($_POST['fieldname'])) ? htmlspecialchars($_POST['fieldname']) : '';
?>" /><br />
<input type="radio" name="groupname" value="php3" <?php
if (isset($_POST['groupname']) && $_POST['groupname'] == 'php3') {
echo 'checked="checked" ';
}
?>/>PHP 3
<input type="radio" name="groupname" value="php4" <?php
if (isset($_POST['groupname']) && $_POST['groupname'] == 'php4') {
echo 'checked="checked" ';
}
?>/>PHP 4
<input type="radio" name="groupname" value="php5" <?php
if (isset($_POST['groupname']) && $_POST['groupname'] == 'php5') {
echo 'checked="checked" ';
}
?>/>PHP 5<br />
<input type="submit" name="Submit" />
</form>
<?php
}
?>
</body>
</html>
For additional information, see the official PHP Language Guide available at: www.php.net/docs.php PHP Tutorials: STRINGSUse these handy PHP Tutorials as a learning tool or as a reference guide for solving everyday common PHP programming tasks. USING THESE SCRIPTS - Clicking each link below will display the PHP source code for that example script at the top of this page. You are welcome to download all of these PHP scripts freely. STRINGS
PHP Tutorials: ARRAYS
PHP Tutorials: DATE and TIME
PHP Tutorials: INTERACTING WITH FORMS
PHP Tutorials: COOKIES and SESSIONS
PHP Tutorials: USING FILES ON THE SERVERTechnical Note: The ability for any of the source code files below to write or modify any file on our server has been disabled. We have comment out that particular section of code. You must uncomment this code before using these scripts with your web site.
Web Developer Books and ResourcesUse these handy resources to grow and expand your developer skills. Web Design & Color TheoryUse these handy resources to grow and expand your designer skills. |
AJAX JavaScript Libraries
The following category groups are available:
Also check out our listing of more than 30 AJAX tutorials. AJAX NEWS a daily dose of the world of Ajax. Web Design News FeedsSource: Fresh Content.net Search Engine OptimizationWhat is Search Engine Optimization? - Search engine optimization is both a niche industry of web marketing and a specific set of practices that guide the creation of a website that ranks well for specific, relevant keyword phrases at the major search engines.
*Not affiliated to RawData. WordPress BLOG SoftwareWordPress is a state-of-the-art semantic personal publishing platform with a focus on aesthetics, web standards, and usability. What a mouthful. WordPress is both free and priceless at the same time.
The WordPress BLOG software is compatible with RawData Hosting Servers.* *Installation & support provided by mfg. Manage MySQL on Mac OS XYourSQL is a simple but powerful program to create and manipulate MySQL databases.
It is intended to be easy to use for the beginner as well as the more advanced user,
*Installation & support provided by mfg. |