I can't help with the php...but I do know that insert statement is invalid.

You need something more like

$sql = "insert into sitesats (id, areview, apositive, anegative, arate)
values('$id', '$areview', '$apositive', '$anegative')";

And I assume the update is trying to update the just-inserted record...

Chuck

----- Original Message -----
From: Vladimir Kravtsov <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 11, 2001 03:40
Subject: Once again, this doesn't do anything.



The following code doesn't insert and update info in the db for some reason:
<html>
<body>
<?php require('../common.php');
if (!isset($areview))

echo("You must review the site"); } else {
if (!isset($apositive)) {
echo("You must review the site"); } else

if (!isset($anegative))

echo("You must review the site"); } else {
connectdb();
mysql_select_db(xtopsites);
$sql = "insert into sitesats set areview='$areview', apositive='$apositive',
anegative='$anegative', arate='$arate' where id='$id'";
$query = mysql_query($sql);
$sql = "update sitesats set validated='2' where id='$id'";
$query = mysql_query($sql);

echo("Review stored successfully.");

} } }
?>
</body>
</html>

It gives me the success message but the db remains untouched. What have I
done this time? :)

Thanks in advance.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to