Originally posted by hermzz
mysql_query ("UPDATE `usercount` SET cuenta=cuenta+1");
$result = mysql_query ("SELECT max(cuenta) FROM `usercount`");
$id = $result
mysql_query ("INSERT INTO `users` (`id`, `name`, `email`, `nick`, `lugar`, `password`, `privileges`) VALUES ('$id', '$name', '$email', '$nick', '$lugar', '$password', '$priv');");
the only problem is that $id doesn't store the $result. [/B]
Instead of having $id = $result, put this in instead:
$row = mysql_fetch_row($result);
mysql_query ("INSERT INTO `users` (`id`, `name`, `email`, `nick`, `lugar`, `password`, `privileges`) VALUES ('$row[0]', '$name', '$email', '$nick', '$lugar', '$password', '$priv');");
This is because what is in $result, isnt the actual data. I think its a pointer to the data or something like that.