PunkSktBrdr01
05-21-2003, 05:54 PM
I was wondering if it is possible to hold several e-mail pages in one PHP file and use PHP to determine which page to display based on a variable or hidden input on the parent page. This is what I've got so far:
<title>send stuff!</title>
<link rel="STYLESHEET" type="text/css" href="../popups/popup.css">
<font color=#F0F0F0>
<form action="mailthing.php" method="post">
<?php
if ($opinion) {
echo('
?>
<center>Hey, it's e-mail time!</center>
<br><br><br><br>
Which topic are you responding to?
<form action="mailthing.php" method="post">
<select name="subject">
<option value="response:society">Society
<option value="response:religion">Religion
</select>
<br><br>
Enter your opinions:
<br>
<textarea name="message" rows=10 cols=50></textarea>
<br><br>
<input type="submit" name="submit" value="I'm in for it, aren't I...">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} elseif ($comment) {
echo('
?>
<br><br>
<center>Tell me whatchu think!</center>
<br><br>
<form action="mailthing.php" method="post">
<textarea rows=10 cols=50>Any ideas? Suggestions? Send 'em to me!</textarea>
<br><br>
<input type="submit" name="submit" value="lemme hear it...">
<input type="hidden" name="subject" value="comments">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} elseif ($random) {
echo('
?>
<br><br>
<center>Randomness!</center>
<br><br>
Got a funny or bizarre quote? A strange story? An annoying habit of submitting stuff whenever you get the opportunity? Your search is over! Send it to me!
<br><br>
<form action="mailthing.php" method="post">
<textarea rows=10 cols=50>Tell me, tell me, tell me!</textarea>
<br><br>
<input type="submit" name="submit" value="well...">
<input type="hidden" name="subject" value="random">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} else {
echo('
?>
<br><br>
<center>EMAIL APP</center>
<br><br>
<center>
To:<input type="text" name="mailto" length=15>
<br>
Subject:<input type="text" name="subject" length=10>
<br>
Message:<textarea rows=10 cols=50></textarea>
<br><br>
<input type="submit" name="submit" value="SEND EMAIL">
<br><br>
</form>
<?
');
}
?>
Any help is appreciated.
<title>send stuff!</title>
<link rel="STYLESHEET" type="text/css" href="../popups/popup.css">
<font color=#F0F0F0>
<form action="mailthing.php" method="post">
<?php
if ($opinion) {
echo('
?>
<center>Hey, it's e-mail time!</center>
<br><br><br><br>
Which topic are you responding to?
<form action="mailthing.php" method="post">
<select name="subject">
<option value="response:society">Society
<option value="response:religion">Religion
</select>
<br><br>
Enter your opinions:
<br>
<textarea name="message" rows=10 cols=50></textarea>
<br><br>
<input type="submit" name="submit" value="I'm in for it, aren't I...">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} elseif ($comment) {
echo('
?>
<br><br>
<center>Tell me whatchu think!</center>
<br><br>
<form action="mailthing.php" method="post">
<textarea rows=10 cols=50>Any ideas? Suggestions? Send 'em to me!</textarea>
<br><br>
<input type="submit" name="submit" value="lemme hear it...">
<input type="hidden" name="subject" value="comments">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} elseif ($random) {
echo('
?>
<br><br>
<center>Randomness!</center>
<br><br>
Got a funny or bizarre quote? A strange story? An annoying habit of submitting stuff whenever you get the opportunity? Your search is over! Send it to me!
<br><br>
<form action="mailthing.php" method="post">
<textarea rows=10 cols=50>Tell me, tell me, tell me!</textarea>
<br><br>
<input type="submit" name="submit" value="well...">
<input type="hidden" name="subject" value="random">
<input type="hidden" name="mailto" value="brandon@radioactiverabbit.com">
</form>
<?
');
} else {
echo('
?>
<br><br>
<center>EMAIL APP</center>
<br><br>
<center>
To:<input type="text" name="mailto" length=15>
<br>
Subject:<input type="text" name="subject" length=10>
<br>
Message:<textarea rows=10 cols=50></textarea>
<br><br>
<input type="submit" name="submit" value="SEND EMAIL">
<br><br>
</form>
<?
');
}
?>
Any help is appreciated.