Even though I execute the the script once(one mysql_query), I get duplicate entries for some reason in the mySQL table.
These entries are not the same - the 'duplicate' entry will always have the same fields for the columns Timestamp and Picture, but the rest of the columns empty.
This is my script:
<?php
 session_start();
 $con = mysql_connect("Fruity.mysql.anyhost.com", "apples", "password");
 mysql_select_db("IAN_1");
 $username = $_SESSION['username'];
 $image = $_POST['image'];
 $post = $_POST['postdescription'];
 $idcolor = $_POST['idcolor'];
 $idbgcolor = $_POST['idbgcolor'];
 $timestamp = date("jS \of F Y h:i:s A P");
 $user_uploadposts = 
 "INSERT INTO $username (Timestamp, Image, Description, ID_color, ID_backgroundcolor)  
  VALUES ('$timestamp','$image', '$post','$idcolor','$idbgcolor')";
  mysql_query($user_uploadposts);
  mysql_close($con)
 ?> 
a screenshot of the problem https://i.stack.imgur.com/s7efO.jpg
 
     
    