|
Posted by Big Moxy on 08/04/07 16:25
The while statement shows that the variable phrase is null. However
the if statements that follow return true because 3 table rows are
created on my page. I know that isset() is true for phrase however
given the display output I expect !is_null() to return false and
therefore leave the if construct. Can someone please tell me why this
is not happening?
value="^^no^^" name="logo" value="296.06" name="part_sell_price"
value="" name="phrase" value="script" name="font_type" value="386"
name="thread_color" value="^^no^^" name="nomex" value="Next >>"
name="Submit"
<?php
session_start();
foreach ($_POST as $key => $value) {
$_SESSION[$key] = $value;
}
while (list($name, $value) = each($HTTP_POST_VARS))
{
echo "value=\"$value\" name=\"$name\"\n";
}
?>
<?php
if (isset($_SESSION['phrase'])) {
if (!is_null($_SESSION['phrase'])) {
if ($_SESSION['phrase'] != "^^no^^") {
?>
<tr>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;"><div align="right"><b>Monogram Color:</b> </
div></td>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;"><img src="media/embroidery/<?php echo
$_SESSION['thread_color']; ?>.jpg"></td>
</tr>
<tr>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;"><div align="right"><b>Monogram:</b></div></
td>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;">"<?php echo $_SESSION['phrase']; ?
>"</td>
</tr>
<tr>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;"><div align="right"><b>Font:</b></div></td>
<td style="font-family: Verdana, Arial, Helvetica, sans-
serif; font-size: 14px;">"<?php echo $_SESSION['font_type']; ?
>"</td>
</tr>
<?php
}
}
}
?>
Thank you!!
tim
Navigation:
[Reply to this message]
|