It is bad to name my form fields the same as my column names? I mean do people really do:
<?php
$id = intval($_POST['user_unique_key']);
$name = mysql_real_escape_string($_POST['name_of_user']);
$email = mysql_real_escape_string($_POST['user_mail_thing']);
$address = mysql_real_escape_string($_POST['user_place_of_living']);
//....
$sql = "INSERT INTO `users`('id','name','email','address') VALUES($id,$name,$email,$address)"
?>
Also note that the above data validation is horrible! I would never use it. My Data Validation
Should I use a table prefix like: 'secret_prefix_'?
The final solution which I don't really like is that I could use a two way hash to hash the fieldnams. so have the input name be
<?php echo $field_name = base64_encode(mcrypt_encrypt( MCRYPT_RIJNDAEL_128, $key, $key, MCRYPT_MODE_ECB, $iv ));?>
and then decode the field name once it is posted
<?php
foreach($_POST as $name=> $value)
{
$input[base64_decode(mcrypt_decrypt( MCRYPT_RIJNDAEL_128, $key, $name, MCRYPT_MODE_ECB, $iv ))] = $value;
}?>