12-02-2016, 04:55 PM
ty, I find other solution to fix my problem.
<pre></pre>
<pre>
Code:
If(isset($_POST['submit'])){
// prepare sql and bind parameters
$cine_post_task = $_POST['cine_post_task'];
$utilizator = $_POST['utilizator'];
$titlu = $_POST['titlu'];
$color = $_POST['color'];
$descriere = $_POST['descriere'];
$data_start = $_POST['data_start'];
$data_end = $_POST['data_end'];
$post_data = $_POST['post_data'];
$post_time = $_POST['post_time'];
$q = "INSERT INTO task (cine_post_task, utilizator, titlu, color, descriere, data_start, data_end, post_data, post_time )
VALUES (
:cine_post_task ,
:utilizator ,
:titlu,
:color ,
:descriere ,
:data_start ,
:data_end ,
:post_data ,
:post_time
)";
$query = $odb->prepare($q);
$results = $query->execute(array(
":cine_post_task" => $cine_post_task ,
":utilizator" => $utilizator ,
":titlu" => $titlu,
":color" => $color ,
":descriere" => $descriere ,
":data_start" => $data_start ,
":data_end" => $data_end ,
":post_data" => $post_data ,
":post_time" => $post_time
));
header('Location: account.php');
}