http://tsn.dk/p/?id=1940
Line 55-57.. For some reason everything seems to be working but nothing is added into my table. I tried using a different method:
їphp]
$sql = "INSERT INTO users (username, password, signature, profile, real name, ipaddress) VALUES ('$username', '$password', '$signature', '$profile', '$realname', '$ip')";
ї/php]
and then using
їphp]
mysql_query($sql);
ї/php]
Got the same result, looked like it worked, no errors, but nothing was added into the table. So i echoed out $sql. Looked perfect, i ran it through the SQL thing in phpmyadmin and the record was created successfully with no errors from MYSQL.. I have no idea what's wrong.. any help appreciated, thanks in advance.
?>
Nothing being added to table...
Moderator: General Moderators
What happens if you try it with:
Code: Select all
<?php
$sql = "INSERT INTO users SET col1='$var1', col2='$var2', etc..";
?>
Last edited by McGruff on Thu Aug 11, 2005 12:09 am, edited 1 time in total.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Do you get anything reported if you do:
Mac
Code: Select all
$sql = "INSERT INTO users (username, password, signature, profile, real name, ipaddress) VALUES ('$username', '$password', '$signature', '$profile', '$realname', '$ip')";
mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');Twig probably has a better suggestion (adding mysql_error) to help you track down the problem but here's a snippet from the mysql manual (mysql.com):
"The INSERT ... VALUES form with multiple value lists is supported in MySQL Version 3.22.5 or later. The col_name=expression syntax is supported in MySQL Version 3.22.10 or later. "
"The INSERT ... VALUES form with multiple value lists is supported in MySQL Version 3.22.5 or later. The col_name=expression syntax is supported in MySQL Version 3.22.10 or later. "