Hi,
once again *g*
> > $sql = "insert into sitesats set areview='$areview', apositive='$apositive',
>anegative='$anegative', arate='$arate' where id='$id'";
Does it make sense to "INSERT INTO . WHERE ..." ? *GG*
Thomas
-
> echo("You must review the site"); } else {
> if (!isset($anegative)) {
> echo("You must review the site"); } else {
> connectdb();
> mysql_select_db(xtopsites);
^^ quotes
> $sql = "insert into sitesats set areview='$areview', apositive='$apositive',
>anegative='$anegat
The insert statement is valid (see http://www.mysql.com/doc/I/N/INSERT.html,
third example), just uncommon.
> I can't help with the php...but I do know that insert statement
> is invalid.
...
>> $sql = "insert into sitesats set areview='$areview',
>> apositive='$apositive', anegative='$anegative'
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
Try echo(mysql_error()); after each call to mysql_query()
> The following code doesn't insert and update info in the db for
> some reason:
(clipped)
> Thanks in advance.
-
Before posting, please check:
http://www.mysql.com/m