Jump to content

Going nuts here


poleman

Recommended Posts

What is Error: Duplicate entry '0' for key 1 and how can i fix it?

 

The php code is as follows:

 

<?php

$con = mysql_connect

("db778.oneandone.co.uk","dbo191523062","zfMcsqnB");

if (!$con)

  {

  die('Could not connect: ' . mysql_error());

  }mysql_select_db("db191523062", $con);$sql="INSERT INTO phpbb_users(username,

user_email)

VALUES

('$_POST[name]','$_POST[useremail]')";if (!mysql_query

($sql,$con))

  {

  die('Error: ' . mysql_error());

  }

echo "1 record added";mysql_close($con)

?>

 

with the form html code as follows:

 

<form method="POST" action="newslettertest4.php">

                        Name: <input type="text" name="name" size="20"><br>

            Email:  <input type="text" name="useremail" size="20"><br>

            <br>

                       <button name="B1">Subscribe</button></p>

          </form>

 

 

 

 

Please hope you can help.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/37652-going-nuts-here/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.