Click to See Complete Forum and Search --> : Generator (blank page error)


starr_05
May 2nd, 2009, 11:13 PM
I've been working on this web page generator for a while that my friend would like to have on their page, but when I test on their ftp server I get a blank page. Can someone please help me and tell me what I am doing wrong? Any help is appreciated.

<!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><p><b>Directions:<br/>In order to design your own web page, please fill out and/or choose the apperance of your web page</b></p></center>

<center><b>Enter your page title:</b><br/> <input type="text" name="pageTitle" /><br /><br /></center>

<center><br><b>Enter your page heading:</b><br/><input type="text" name="pageHeading" /><br /><br /></center>


<center><b> Choose your background color:<b><br/>
<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/>
<br/></center>

<center><b> Choose your text color:<b><br/>
<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/>
<br/>
</center>


<center>
<b>Pick your font:</b></br>
<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>
</center><br/><br/>

<div id="urls">
<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></div>

<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>


<!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"];
$pageHeading = $_POST["heading"];
$pageFont = $_POST["pageFont"];



$url = $_POST["url"];

for ($u=0; $u <7; $u++) {
if ($url[$u] != "" && $label[$u] != ""){
{
$urls = true;
}
print <<< link

$label = $_POST["label"];
$pageText = $_POST["pageText"];


?>


<html>
<head>
<title><?php echo $pageTitle;
?>
</title>
</head>

<body style="font-family: $pageFont; color: $textColor; background-color: $pageBackground">


text="<?php echo $textColor; ?>">
<h1><?php echo $pageHeading; ?></h1>

<?php echo $pageText; ?>


</body>
</html>

starr_05
May 2nd, 2009, 11:57 PM
Sorry, I forget to mention, I am using php

PeejAvery
May 3rd, 2009, 09:35 AM
Blank pages usually mean that their is a PHP error. Did you try checking your PHP log first?

starr_05
May 3rd, 2009, 12:30 PM
No, I didnt try checking my php log first. How do I check it? I've been using notepad to do my php pages.

PeejAvery
May 3rd, 2009, 01:30 PM
Look for your error log within the PHP folder. That could depend on how you did your setup.

Also, I would suggest using a PHP IDE instead of just notepad. That will give you syntax coloring so that you can better see your code.

Teranoz
May 5th, 2009, 02:23 AM
Also, I would suggest using a PHP IDE instead of just notepad.

I would recommend this one http://www.zend.com/en/community/pdt

Eclipse with php plugin, and free also (you will need java to run it)

Xeel
May 7th, 2009, 07:24 PM
EasyEclipse for PHP (free, fast and powerfull): http://www.easyeclipse.org/site/distributions/index.html
NetBeans for PHP (free, best community support, a bit slow): http://www.netbeans.org/downloads/index.html
DreamWeaver CS4 (commercial software, best for html and css): http://www.adobe.com/products/dreamweaver/