Hi. I have a script which is really straight forward, but for the past 4 days I couldn't figure out why this stup*d script won't work. Here it is:
the form...
<form method="POST" action="pratingsystem.php">
<?php
echo '<input type="hidden" name="jokeId" value="$id">';
?>
<input type="radio" value="5" checked name="rating">Excellent
<input type="radio" name="rating" value="4">Good
<input type="radio" name="rating" value="3">OK
<input type="radio" name="rating" value="2">Not-so-good
<input type="radio" name="rating" value="1">Sucks</p>
<p><input type="submit" value="Submit" name="B1"></p>
</form>
$id is gottten like this from the URL (something.php?id=1)
Proccessing script:
<?php
$db = mysql_connect("localhost","","");
mysql_select_db("dbthawowi_2",$db);;
$query = 'INSERT INTO evaluation (id, rating) VALUES ('.$_POST['jokeId'].','.$_POST['rating'].')';
$result=mysql_query($query, $db);
echo "operation successful";
?>
The script returns an "operation successful" (my comment), but nothing gets entered into the db. WHY???
Thanks.