I have a sign up form on my website, and for some reason (it seems to have only started now) when you submit, it adds two records to the database.
$sql = "INSERT INTO roster SET first_name='$first', last_name='$last', email='$email', password='$password', hours='0.0', date = CURDATE()";
$result=mysql_query($sql)
OR die("Query error:<br />{$sql}<br />" .mysql_error());
if (mysql_query($sql)) {
That's the INSERT query it uses, why is it adding two records?
Question 2.
As you can see, this query inserts the date the user signs up. I also have another form that users submit which also submits a date to another table.
How can I find how long ago the user either submitted the other form, or, if they haven't, the date they registered?
Thanks