> Torsten
>
> I managed to work through it and this is the code:
>
>   $NewUserID=                            $_POST['TXT_UserID'];
>   $NewUserPassword=                $_POST['TXT_UserPassword'];
>   $NewUserComments=                $_POST['TXT_Comments'];
>   $NewUserFurtherComments=$_POST['TXT_FurtherComments'];
>   $sql = "INSERT INTO RegisteredMembers
> (UserID,UserPassword,Comments,FurtherComments)
>
> VALUES('".$NewUserID."','".$NewUserPassword."','".$NewUserComments
> ."','".$Ne
> wUserFurtherComments."')";
>   $query = mysql_query($sql);
>       $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid
> Query - " . mysql_error());
>
>       echo "<pre>Username:\t\t$NewUserID</pre><br>";
>       echo "<pre>Password:\t\t$NewUserPassword</pre><br>";
>       echo "<pre>Comments:\t\t$NewUserComments</pre><br>";
>       echo "<pre>Further Comments:\t$NewUserFurtherComments</pre>";
>
>       mysql_close ($Connection);
>
> However. I still get an error although the input is actually
> commited to the
> database:
>
> Invalid Query - Duplicate entry 'SherylJo' for key 1
>
> I don't follow this because although I have set that particular
> field up as
> a primary key this value is not duplicated... Strange.

Hi Michael,

please always anser to the list (Answer All). Could you post your table
structure?

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to