i switched host and went from php 4 to php 5. I don't get the if statement to work
if ($go=="edit") }
gives me a blank page.
<?
include ("header.php");
if ($go=="edit") {
$queryconf = "select * from news_config";
$qryconf = @mysql_query($queryconf,$connect) or die ("Wrong Query");
$rowconf = mysql_fetch_array ($qryconf);
?>
<br />
<table width="500" border="0" cellspacing="0" cellpadding="1" bgcolor="#9D9D00" align="center">
<tr>
<td>
<table width="500" border="0" cellspacing="2" cellpadding="2" align="center" bgcolor="#E7E7CF">
<tr>
<td colspan="2" align="center" class="newstitle">SITE CONFIGURATION</td>
</tr>
<form action="?go=process" method="post" name="configform">
<tr bgcolor="#C6C68C">
<td width="150">[META] Keyword
<div class="newsdate">saparate by comma</div>
</td>
<td> <textarea name="keyword" cols="55" rows="3" class="textbox"><? echo "$rowconf[keyword]"; ?></textarea></td>
</tr>
<tr bgcolor="#C6C68C">
<td>[META] Description
<div class="newsdate"></div>
</td>
<td> <textarea name="description" cols="55" rows="3" class="textbox"><? echo "$rowconf[description]"; ?></textarea></td>
</tr>
<tr bgcolor="#C6C68C">
<td>Site Title
</td>
<td> <input type="text" name="site_title" size="56" value="<? echo "$rowconf[site_title]"; ?>" class="textbox"></td>
</tr>
<tr bgcolor="#C6C68C">
<td>Site Slogan
</td>
<td> <input type="text" name="site_slogan" size="56" value="<? echo "$rowconf[site_slogan]"; ?>" class="textbox"></td>
</tr>
<tr bgcolor="#C6C68C">
<td>How many news on page
</td>
<td> <input type="text" name="numnews" size="2" value="<? echo "$rowconf[numnews]"; ?>" class="textbox" maxlength="2"></td>
</tr>
<tr bgcolor="#C6C68C">
<td>Max. news photo size
</td>
<td> <input type="text" name="maxgfx" size="7" value="<? echo "$rowconf[maxgfx]"; ?>" class="textbox" maxlength="7"> bytes</td>
</tr>
<tr bgcolor="#C6C68C">
<td>Allow click count on news page
<div class="newsdate">
Current: <b>
<?
if ($rowconf[allow_click] == 1) {
echo "Yes";
} else {
echo "No";
}
?>
</b></div>
</td>
<td> <input type="checkbox" value="1" name="allow_click" checked> Yes</td>
</tr>
<tr bgcolor="#C6C68C">
<td>Allow user comment
<div class="newsdate">
Current: <b>
<?
if ($rowconf[allow_com] == 1) {
echo "Yes";
} else {
echo "No";
}
?>
</b></div>
</td>
<td> <input type="checkbox" value="1" name="allow_com" checked> Yes</td>
</tr>
<tr bgcolor="#C6C68C">
<td>If comment is allowed, it must
<div class="newsdate">
Current: <br /><b>
<?
if ($rowconf[auto_com] == 1) {
echo "Permited by administrator";
} else {
echo "Didn't need verify by administrator";
}
?>
</b></div>
</td>
<td> <input type="radio" value="1" name="auto_com" checked> Verify by administrator<br>
<input type="radio" value="0" name="auto_com"> Didn't need verify by administrator</td>
</tr>
<tr bgcolor="#C6C68C">
<td>Max. comment
</td>
<td> <input type="text" name="max_com" size="7" value="<? echo "$rowconf[max_com]"; ?>" class="textbox" maxlength="5"> characters</td>
</tr>
<tr bgcolor="#C6C68C">
<td>News date format
<div class="newsdate">Curent: <br /><b>
<?
print date("$rowconf[date_format]");
?></b></div>
</td>
<td><div class="newsdate"> <input type="text" name="date_format" size="12" value="<? echo "$rowconf[date_format]"; ?>" class="textbox">
ex: <b>d F Y h:i a</b> for <? print date("d F Y h:i a"); ?></div></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="Update" class="boxlook">
<input type="reset" value="Reset" class="boxlook">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<?
}
if ($go=="process") {
@mysql_query("update news_config set keyword='$keyword',description='$description',site_title='$site_title',site_slogan='$site_slogan',numnews='$numnews',maxgfx='$maxgfx',allow_click='$allow_click',allow_com='$allow_com',auto_com='$auto_com',max_com='$max_com',date_format='$date_format'") or die ("There's something wrong");
echo " <center>Updating site configuration was success<br>
Please wait for a second, or <a href=\"?go=edit\">click here</a> if your browser doesn't refresh automatically";
echo "<meta http-equiv=\"refresh\" content=\"1;URL=?go=edit\">";
}
include ("footer.php");
?>
Any help would be great!
thanks
S.