Hi..thats strange ..are you using google chrome..I had a similar problem once using chrome but not now any ways.
Heres my connect.php page :
PHP Code:
DEFINE ('DB_USER', '********');
DEFINE ('DB_PASSWORD', '********');
DEFINE ('DB_HOST', ********');
DEFINE ('DB_NAME', '********');
/* connect */
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not Connect to MySQL: ' . mysql_error() );
/* select the data base */
@mysql_select_db (DB_NAME) OR die ('Could not select the Database: ' . mysql_error() );
I will try and remove the @'s from the above code to see if that helps
heres my simple script which checks the database first then inserts if the records do not exist already:
PHP Code:
/* Connecting to the Data Base*/
require('connections/connect.php');
$query = "SELECT * FROM tag"; // build the query
require('includes/query/query.php'); // Run the query
$info = mysql_fetch_array( $result );$num =mysql_num_rows($result);
while ($row = mysql_fetch_array
($result, MYSQL_ASSOC)) {
$db = $row['email'].$row['url'].$row['yourtag'].$row['ip_add'];
$check = $email.$url.$tag.$ip;
if ($check == $db){// checks if this tag is already in the database.... incase people goback to this page
$donotsubit = '1';
}
}
mysql_close(DB_NAME);//close the data base before reopening it
/* Connecting to the Data Base*/
require('connections/connect.php');
if ($donotsubit <> '1'){
$query = "INSERT INTO tag (type, status, date, name, email, yourtag, url, description, descriptionc, fontsize, fontc, borderc, backc, price, paid, ip_add) VALUES ('3', '2', NOW(), '', '$email', '$tag', '$url', '$description', '$descriptionc', '', '$fontc' , '$borderc' , '$backc' , '$totalcost' , '', '' )";
$result = mysql_query ($query); // Run the query
if ($result){ // query went ok
echo '<p><span class="ok">Your Tag has been successfully entered into our database. Thank you.</span><br />';
echo '<p><span class="ok">Confirmation has been sent to your email address.</span></p>';
} else {// query did not go ok
echo '<p class="notok">Could not submit due to a Server Error... Please try again later!</p>
<a href="index.php><< Go Back</a>';$serror = '1';
}
}else {echo 'Already Submitted !!!';}
Try using similar routines instead..change the code.
Hope this helps...