View previous topic :: View next topic |
Author |
Message |
stord2000 -
Joined: 13 May 2004 Posts: 4
|
Posted: Mon May 17, 2004 6:48 am Post subject: PHP newbie |
|
|
Notice: Undefined variable: Text in C:\Program Files\Abyss Web Server\htdocs\php\borderMaker.php on line 22
I cannot find what i did wrong here are the two files am working on
HTML code for the form on borderMaker.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Font choices </title>
</head>
<body>
<center>
<h1> Font Choices</h1>
<hr>Demonstrate how to read HTML form Elements</h3>
<form method = "post"
action = "borderMaker.php">
<h3> Text to modify</h3>
<textarea name = "Text"
rows = "10"
cols = "40">
Four score and seven years ago our fathers brought forth on this
continent a new nation, conveived in librety and dedication to the
proposition that all men are created equal. Now we are engaged in
a great global war, testing whether that nation or any nation so
conceived and so dedicated can long endure.
</textarea>
<table border =2>
<tr>
<td> <h3> Border Style</h3></td>
<td colspan = "2"><h3> Border style</h3></td>
<td><h3> Border color</h3></td>
</tr>
<tr>
<td>
<select name = borderStyle>
<option value = "ridge"> ridge</option>
<option value = "groove"> groove</option>
<option value = "double"> double</option>
<option value = "inset"> inset</option>
<option value = "outset"> outset</option>
</select>
</td>
<td>
<select size =5
name = borderSize>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
<option value = "5">5</option>
<option value = "10">10</option>
</select>
</td>
<td>
<input type = "radio"
name = "sizeType"
value "px">pixels<br>
<input type = "radio"
name = "sizeType"
value "pt">points<br>
<input type = "radio"
name = "sizeType"
value "pt">points<br>
<input type = "radio"
name = "sizeType"
value "cm">centimeters<br>
<input type = "radio"
name = "sizeType"
value "in">inches<br>
</td>
<td>
<input type = "radio"
name = "borderColor"
value "green">green<br>
<input type = "radio"
name = "borderColor"
value "red">red<br>
<input type = "radio"
name = "borderColor"
value "blue">blue<br>
<input type = "radio"
name = "borderColor"
value "yellow">yellow<br>
<input type = "radio"
name = "borderColor"
value "maroon">maroon<br>
</td>
</tr>
</table>
<input type = "submit"
value = "show Me">
</form>
</body>
</html>
Now the Php code for borderMaker.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Your Output</title>
</head>
<body>
<h1><center> Your Output</center></h1>
<center>
<?
$theStyle=<<<HERE
"border-width:$borderSize$sizeType;
border-style:$borderStyle;
border-color :green"
HERE;
print "<div style = $theStyle>";
print $Text;
print "</span>";
?>
</center>
</body>
</html>
I am unable to find my error
Last edited by stord2000 on Mon May 17, 2004 6:46 pm; edited 4 times in total |
|
Back to top |
|
 |
midtoad -
Joined: 17 May 2004 Posts: 1
|
Posted: Mon May 17, 2004 7:00 am Post subject: |
|
|
try posting on a PHP forum instead of a server forum and you might get more, or better, answers. Visit php.net. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon May 17, 2004 8:29 am Post subject: |
|
|
These are notices which tell you that the variable is Undefined
so far but if you have the script working properly , you can use
this at the top of your PHP code to take off Notices.
Code: |
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
|
|
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Mon May 17, 2004 3:54 pm Post subject: |
|
|
midtoad wrote: | try posting on a PHP forum instead of a server forum and you might get more, or better, answers. Visit php.net. |
I'm sure the people here can help you out just fine (there's a PHP section here for a reason)...
Would you mind showing us the code of the PHP script? _________________ Bienvenidos! |
|
Back to top |
 |
 |
|