Hello, I'm putting together a simple wishlist and I encountered a problem where from a login page I'm sending a variable that will be a table name, but as the script executes it gives a mistake showing that it "can't see" where I'm trying to insert the data. Any advice will be very appreciated! Thank you! [i][color=purple]index.html[/color][/i] <form action="view.php" method="post"> First Name: <input type="text" name="first"><br> Last Name: <input type="text" name="last"><br> <input type="Submit"> [i][color=purple]view.php[/color][/i] <?php [b]$table[/b]=$_POST['first']; function insert_db($wish, $link){ require_once('db_login.php'); require_once('DB.php'); $connection = DB::connect("mysql://$db_username:$db_password@$db_host/$db_database"); if (DB::isError($connection)){ die ("Could not connect to the database: <br />". DB::errorMessage($connection)); } $query = "INSERT INTO [b]$table[/b] VALUES (NULL,'$wish','$link','','','')"; $result = $connection->query($query); if (DB::isError($result)){ die("Could not query the database: <br />". $query." ".DB::errorMessage($result)); } echo "Inserted OK.<br />"; $query = "SELECT * FROM [b]$table[/b]"; $result = $connection->query($query); if (DB::isError($result)){ die("Could not query the database: <br />". $query." ".DB::errorMessage($result)); } ... [i]error message[/i] Could not query the database: INSERT INTO VALUES (NULL,'hjk','ghj','','','') syntax error