Thanks!
HTML form
Code: Select all
<!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>Web Page Generator</title>
<script type="text/javascript">
function formReset()
{
document.getElementById("webPageGeneratorForm").reset()
}
</script>
</head>
<body bgcolor="purple">
<center><h1>Web Page Generator</h1></center>
<form action="webPageGenerator.php" method="POST" id="webPageGeneratorForm">
<center><b>Enter your page title:</b><br/> <input type="text" name="pageTitle" /><br /><br
/></center>
<center><b> Choose your background color:<b><br/>
<td>
<input type = "radio"
name = "pageBackground"
value = "pink"
checked = "checked" /><font color="pink">Pink</font><br />
<input type = "radio"
name = "pageBackground"
value = "teal" /><font color="teal">Teal</font><br />
<input type = "radio"
name = "pageBackground"
value = "blue" /><font color="blue">Blue</font><br />
<input type = "radio"
name = "pageBackground"
value = "lime" /><font color="lime">Lime</font></a> <br/>
</td>
</tr>
</table><br/></center>
<center><b> Choose your text color:<b><br/>
<td>
<input type = "radio"
name = "textColor"
value = "black"
checked = "checked" />Black<br />
<input type = "radio"
name = "textColor"
value = "maroon" /><font color="maroon">Maroon</font><br />
<input type = "radio"
name = "textColor"
value = "red" /><font color="red">Red</font><br />
<input type = "radio"
name = "textColor"
value = "yellow" /><font color="yellow">Yellow</font></a> <br/>
</td>
<br/>
</center>
<center>
<b>Pick your font:</b></br>
<td>
<select name = "pageFont">
<option value = "arial">Arial</option>
<option value = "helvetica">Helvetica</option>
<option value = "times">Times</option>
<option value = "serif">Serif</option>
<option value = "verdana">Verdana</option>
</select>
</td>
</center><br/><br/>
<center><b>Enter up to 7 links:</b><br/>
<b>Link 1:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 2:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 3:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 4:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 5:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 6:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
<b>Link 7:</b><input type="text" name="url" /><br /><br/>
<b>Label:</b><input type="text" name="label" /><br /><br/>
</center>
<p><center><b>Below you may fill out three (3) paragraphs with the desired
content.</b></p></center>
<center><b>Paragraph 1<b><br/><br/><br/><br/><textarea name="pageText" cols="40"
rows="5"></textarea></center><br /><br /><br/>
<center><b>Paragraph 2<b><br/><br/><br/><br/><textarea name="pageText" cols="40"
rows="5"></textarea></center><br /><br /><br/>
<center><b>Paragraph 3<b><br/><br/><br/><br/><textarea name="pageText" cols="40"
rows="5"></textarea></center><br /><br /><br/>
<center><input type="submit" name="submit" value="Make My Page"><input type="button"
onclick="formReset()" value="Clear"></center>
</form>
</body>
</html>PHP Code
Code: Select all
<!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">
<?php
$pageTitle = $_POST["pageTitle"];
$pageBackground = $_POST["pageBackground"];
$textColor = $_POST["textColor"];
$pageFont = $_POST["pageFont"];
$url = $_POST["url"];
$label = $_POST["label"];
for ($u=0; $u <7; $u++) {
if ($url[$u] != "" and $label[$u] != "")}
$pageText = $_POST["pageText"];
?>
<head>
<title><?php echo $pageTitle;
?>
</title>
</head>
<html>
<body style="font-family: $pageFont; color: $textColor; background-color: $pageBackground">
text-align: center; font-size: 14pt">$pageText</p>
<b><u><center><?php echo $pageTitle; ?></b></u></center>
<br /><br />
<center><p>
<?php echo $pageText; ?></p></center>
</body>
</html>