Some way to shorten this script ?? Or every time I make a INSERT
in the database using PDO and the bindValue
function, will I have to write row by line ?? Or you can use an array or something faster and easier.
//Prepara o cadastro
$lc_reg = $pdo->prepare("INSERT INTO lc_users(u_username,u_email,u_pass,u_nome,u_sobrenome,u_dia,u_mes,u_ano)VALUES(:user,:email,:pass,:nome,:sobrenome,:dia,:mes,:ano,:sex)");
$lc_reg->bindValue(":user",$reg_user);
$lc_reg->bindValue(":email",$reg_email);
$lc_reg->bindValue(":pass",$reg_senha);
$lc_reg->bindValue(":nome",$reg_nome);
$lc_reg->bindValue(":sobrenome",$reg_sobrenome);
$lc_reg->bindValue(":dia",$reg_dia);
$lc_reg->bindValue(":mes",$reg_mes);
$lc_reg->bindValue(":ano",$reg_ano);
$lc_reg->bindValue(":sex",$reg_sex);