jarv
07-17-2008, 09:46 AM
My if else statement at the top of my code does not work?! can someone please help me?!
it's just writing out the code on the page
echo <<<EOF
<a title="$HeaderID" id="$HeaderID" name="$HeaderID"></a>
if ($HeaderDate = date("d")+6) {
<div class="poo">
}
else
{
<div class="entry_header">
}
<b>Header Name:</b> $HeaderName <a href="edit.php?HeaderID=$HeaderID"><img src="images/picture_edit.png" border="0" /></a> <a href="upload.php?HeaderID=$HeaderID"><img src="images/picture_right.png" border="0" /></a><br />
<b>Country:</b> <a href="http://www.avert.org/photo_search.php?search_keyword_id=&search_country_id=country-$CountryID&page_type=thumbnails&search=search" target="_blank">$Country</a> <b>Keywords:</b>
EOF;
//loop through Keywords
$i = 0;
while ($row1 = mysql_fetch_array($result2))
{
if ($i++ > 0)
{
echo ', ';
}
$Keyword = $row1['keyword'];
$KeywordID = $row1['keyword_id'];
echo '<a href="http://www.avert.org/photo_search.php?search_keyword_id='.$KeywordID.'&search_country_id=&page_type=thumbnails&search=search" target="_blank" >'.$Keyword.'</a>';
echo ' <a href="editkeywords.php?HeaderID='.$HeaderID.'">[Edit]</a>';
}
it's just writing out the code on the page
echo <<<EOF
<a title="$HeaderID" id="$HeaderID" name="$HeaderID"></a>
if ($HeaderDate = date("d")+6) {
<div class="poo">
}
else
{
<div class="entry_header">
}
<b>Header Name:</b> $HeaderName <a href="edit.php?HeaderID=$HeaderID"><img src="images/picture_edit.png" border="0" /></a> <a href="upload.php?HeaderID=$HeaderID"><img src="images/picture_right.png" border="0" /></a><br />
<b>Country:</b> <a href="http://www.avert.org/photo_search.php?search_keyword_id=&search_country_id=country-$CountryID&page_type=thumbnails&search=search" target="_blank">$Country</a> <b>Keywords:</b>
EOF;
//loop through Keywords
$i = 0;
while ($row1 = mysql_fetch_array($result2))
{
if ($i++ > 0)
{
echo ', ';
}
$Keyword = $row1['keyword'];
$KeywordID = $row1['keyword_id'];
echo '<a href="http://www.avert.org/photo_search.php?search_keyword_id='.$KeywordID.'&search_country_id=&page_type=thumbnails&search=search" target="_blank" >'.$Keyword.'</a>';
echo ' <a href="editkeywords.php?HeaderID='.$HeaderID.'">[Edit]</a>';
}