|
Posted by Johnny on 08/28/06 13:16
<nobody@thisaddress.net> wrote in message
news:44F27A73.8000102@thisaddress.net...
> Hi John,
>
> Sure. Here it is. Hope this helps.
>
> <?PHP
>
> $connection = mysql_connect("serverhost","username","password");
>
>
> if (!$connection) {
> die ("Could not connect: " . mysql_error());
> }else{
> echo "Connected";
> }
>
> mysql_select_db("dbname", $connection);
>
> $sql = ("INSERT INTO newsletter
> (email)
> VALUES
> ('$_POST[email]')");
>
> mysql_query($sql,$connection);
>
> if (!mysql_query($sql,$connection)) {
> die ("Could not update" . mysql_error());
> }
> echo "Updated";
>
> ?>
loks like you have called 'mysql_query($sql,$connection)' twice to
me....that might explain the double entry.
Navigation:
[Reply to this message]
|