I have a PHP form with the following two files:
index.php:
Code:
<html>
<head>
<title>
WikiHub Request Wiki
</title>
</head>
<body>
<form action="submit.php" method="post">
<fieldset>
<label for="name">Your name:</label>
<input type="text" name="name" size="45"/>
<br>
<label for="email">Your email address:</label>
<input type="text" name="email" size="50"/>
<br>
<label for="wikiName">Name of your wiki:</label>
<input type="text" name="wikiName" size="40"/>
<br>
<label for="metaNS">Meta namespace:</label>
<input type="text" name="metaNS" size="50"/>
<span>This is the name of the page name prefix that is used for
pages about your wiki. Leave this blank if you want.</span>
<br>
<label for="subdomain">Subdomain</label>
<input type="text" name="subdomain" size="30"/>
<span>.wikihub.ssu.lt</span>
<br>
<label for="topic">Topic: Please describe the topic of your
wiki and what it will be about, or what
you plan to do with it.<br>Please write enough
to show us that this is a legitimate request
and not spam.</label><br>
<textarea cols="70" rows="10" name="topic"></textarea>
</fieldset>
<br>
<fieldset align="center">
<input type="submit" value="Submit"/>
</fieldset>
</form>
</body>
</html>
submit.php
Code:
<html>
<head>
<title>
Form submitted
</title>
</head>
<body>
<?php
// Get information from form
$name = trim($_REQUEST['name']);
$email = trim($_REQUEST['email']);
$wikiName = trim($_REQUEST['wikiName']);
$metaNS = trim($_REQUEST['metaNS']);
$subdomain = trim($_REQUEST['subdomain']);
$topic = trim($_REQUEST['topic']);
// Send email
// Construct email
$emailText = '
A new wiki has been requested:
Requested by: '.$name.'
Contact email: '.$email.'
Name of requested wiki: '.$wikiName.'
Meta namespace: '.$metaNS.'
Subdomain: '.$subdomain.'
Topic:
'.$topic.'
';
// Information for email
$destinationEmail = 'xxxxxxxxxxxxx';
$emailSubject = 'WIKIHUB NEW WIKI REQUEST';
$emailHeader = 'From: wikihub@server.sturmkrieg.com';
mail( $destinationEmail, $emailSubject, $emailText, $emailHeader );
// Explain form on webpage
echo "
The form that you submitted contained:<br>
Your name: $name<br>
Your email address: $email<br>
Name of your wiki: $wikiName<br>
Meta namespace (if specified): $metaNS<br>
Domain of your wiki: $subdomain<!-- -->.wikihub.ssu.lt
Topic of your wiki:<br>$topic
";
?>
</body>
</html>
The Topic part keeps getting left out, both on submit.php and in the email.