error_22
01-15-2006, 06:59 PM
i wrote this, but its not working, and i have no idea what ive done wrong. Im just a newbie heh, can someone help?
thanks in advance
require ("./includes/config.php");
$db_connection = mysql_connect("$server","$user","$pass") or die ("No DB Connection");
$db = mysql_select_db("$db",$db_connection) or die ("Couldn't select DB");
if ($action == "change"){
$change = mysql_db_query($db,"SELECT * FROM page Where id='".$_GET[id]."'");
while ($RS = mysql_fetch_array($change)){
$id = $RS["id"];
$presentation = $RS["presentation"];
?>
<form method="post" action="presentation.php?action=update&id=<?=$id?>" name="page" onSubmit="return Gb()">
<tr>
<td valign="top" colspan="2"> <b>Message:</b><br><textarea name="presentation" cols="62" rows="8"><?=$presentation?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="posta" value="?ndra inl?gg"></td>
</tr>
</form>
<? } ?>
I get the following error:
Parse error: parse error, unexpected $ in /home/wwwocto2/public_html/kabelkontakten/admin/presentation.php on line 34
Line 34 is:
<? } ?>
thanks in advance
require ("./includes/config.php");
$db_connection = mysql_connect("$server","$user","$pass") or die ("No DB Connection");
$db = mysql_select_db("$db",$db_connection) or die ("Couldn't select DB");
if ($action == "change"){
$change = mysql_db_query($db,"SELECT * FROM page Where id='".$_GET[id]."'");
while ($RS = mysql_fetch_array($change)){
$id = $RS["id"];
$presentation = $RS["presentation"];
?>
<form method="post" action="presentation.php?action=update&id=<?=$id?>" name="page" onSubmit="return Gb()">
<tr>
<td valign="top" colspan="2"> <b>Message:</b><br><textarea name="presentation" cols="62" rows="8"><?=$presentation?></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="posta" value="?ndra inl?gg"></td>
</tr>
</form>
<? } ?>
I get the following error:
Parse error: parse error, unexpected $ in /home/wwwocto2/public_html/kabelkontakten/admin/presentation.php on line 34
Line 34 is:
<? } ?>