hallo iedereen ik heb een script geschreven in PHP dat gegevens naar de database verzend,
maar ik maak ook gebruik van JS en daar krijg ik de volgende 2 fouten over:
regel 67
Fout: Object wordt verwacht
regel 92
'SymRealWinOpen' is niet gedefineerd
hier is het script:
(regel 67 is onderstreept en regel 92 bestaat niet )
maar ik maak ook gebruik van JS en daar krijg ik de volgende 2 fouten over:
regel 67
Fout: Object wordt verwacht
regel 92
'SymRealWinOpen' is niet gedefineerd
hier is het script:
(regel 67 is onderstreept en regel 92 bestaat niet )
PHP:
<html>
<head>
<title>
Reageer op news bericht
</title
<script>
<!--
if (window!= top)
top.location.href=location.href
// -->
</script>
</head>
<body>
<?php
$id = $_GET['id'];
include("connect.php");
if(!empty($_POST))
{
$name = htmlspecialchars($_POST['name']);
$mssg = htmlspecialchars($_POST['mssg']);
$date = date("j-n-Y, H:i");
$mssg = str_replace("=)", ":)", $mssg);
$mssg = str_replace(":d", ":D", $mssg);
$mssg = str_replace("=d", ":D", $mssg);
$mssg = str_replace("=D", ":D", $mssg);
$mssg = str_replace("=P", ":P", $mssg);
$mssg = str_replace("=p", ":P", $mssg);
$mssg = str_replace(":p", ":P", $mssg);
$mssg = str_replace("(a)", "(A)", $mssg);
$mssg = str_replace("^o^", "^0^", $mssg);
$mssg = str_replace("^O^", "^0^", $mssg);
$mssg = str_replace("(y)", "(Y)", $mssg);
$mssg = str_replace("(l)", "(L)", $mssg);
if($name == "" or $name == "naam")
{
echo "Je hebt geen naam ingevuld!";
}
elseif($mssg == "")
{
echo "Je hebt geen reactie gegeven!";
}
else
{
$query = "INSERT INTO New SET NewsID='$id', Date='$date', Name='$name', Mssg='$mssg'";
$result = mysql_query($query) or die("Je reactie kon niet gepost worden!");
echo "<script language='javascript'>";
echo "window.close();";
echo "</script>";
}
}
else
{
if($id == "" or $id == "0")
{
echo "Foute aanroep vanhet script!";
die();
}
echo "<p align='center'>";
echo "<form name='react' method='post' action='react.php?id=" . $id . "'>";
?>
<input type="text" name="name" onclick="document.react.name.value=''" value="naam" maxlength="20" size="23"><br>
<a class="std">Reactie:</a><br>
<textarea cols="50" rows="15" name="mssg"></textarea><br>
<input type="submit" value="Verzend" name="submit"><input type="reset" value="Leeg velden" name="reset">
</form>
<table border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">[U]
<tr>[/U]
<td>
<img src="smilies/happy.gif" alt=":)" onclick="document.react.mssg.value=document.react.mssg.value+':)'">
<img src="smilies/happy2.gif" alt=":D" onclick="document.react.mssg.value=document.react.mssg.value+':D'">
<img src="smilies/p.gif" alt=":P" onclick="document.react.mssg.value=document.react.mssg.value+':P'">
<img src="smilies/shame.gif" alt=":$" onclick="document.react.mssg.value=document.react.mssg.value+':$'">
<img src="smilies/angry.gif" alt=":@" onclick="document.react.mssg.value=document.react.mssg.value+':@'">
<img src="smilies/angel.gif" alt="(A)" onclick="document.react.mssg.value=document.react.mssg.value+'(A)'">
<img src="smilies/devil.gif" alt="(6)" onclick="document.react.mssg.value=document.react.mssg.value+'(6)'">
<img src="smilies/dirty.gif" alt=":+" onclick="document.react.mssg.value=document.react.mssg.value+':+'">
<img src="smilies/funny.gif" alt="^0^" onclick="document.react.mssg.value=document.react.mssg.value+'^0^'"><br>
<img src="smilies/sleep.gif" alt="|-)" onclick="document.react.mssg.value=document.react.mssg.value+'|-)'">
<img src="smilies/thumb.gif" alt="(Y)" onclick="document.react.mssg.value=document.react.mssg.value+'(Y)'">
<img src="smilies/love.gif" alt="(L)" onclick="document.react.mssg.value=document.react.mssg.value+'(L)'"
<img src="smilies/muur.gif" alt=":)|" onclick="document.react.mssg.value=document.react.mssg.value+':||'">
<img src="smilies/hate.gif" alt=":^" onclick="document.react.mssg.value=document.react.mssg.value+':^'">
</td>
</tr>
</table>
</p>
<?php
}
?>
</body>
</html>