php - I can't insert data in my database. Where I'm going wrong? -


here code. i'm using php 5.4 , pdo connection! included database connection , other files need. , have registration form wich add values filling them. ridirection made , not problem shown. when check db not added. i'm going wrong?

code

 <?php  include'db.php';  include'header.php';  require 'vendndodhje.php';   $vendndodhjeinput = new vendndodhje();   if ( !empty($_post)) {  // keep track validation errors  $emererror = null;  $mbiemerlerror = null;     $dtlerror = null;     $telerror = null;     $emailerror = null;     $vendndodhjeerror=null;      // keep track post values     $emer = $_post['emer'];     $mbiemer = $_post['mbiemer'];     $datelindje = $_post['datelindje'];     $tel = $_post['tel'];     $email = $_post['email'];     $vendndodhje=$_post['vendndodhje'];      //insert values   if ($valid) {   $pdo = database::connect();    $sql = "insert klienti(emer,mbiemer,datelindje,tel,email,vendndodhje,date_aplikimi) values(?, ?, ?, ?, ?, ?, now())";     $q = $pdo->prepare($sql);     $q->execute(array($emer, $mbiemer, $datelindje, $tel,$email, $vendndodhje));     }   header("location: form'.php");  } ?> 

you can try this:

$(document).ready(function($) {    $('#accordion').find('.accordion-toggle').click(function() {      //expand or collapse panel      $(this).next().slidetoggle(500);      //hide other panels      $(".accordion-content").not($(this).next()).slideup(1000);            $(".active").removeclass("active");            $("#accordion")        .find(".glyphicon")        .removeclass("glyphicon-remove-circle")        .addclass("glyphicon-plus-sign")            $(this)        .addclass("active")        .find('.glyphicon')        .removeclass("glyphicon-plus-sign")        .addclass("glyphicon-remove-circle")    });  });
.active > .glyphicon{    color:orange;  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>    <div id="accordion">    <h4 class="accordion-toggle active">      <span class="glyphicon glyphicon-remove-circle"></span>       wise busy ast both park when ye no nay her</h4>    <div class="accordion-content default">      <p>        cras malesuada ultrices augue molestie risus.</p>    </div>    <h4 class="accordion-toggle">      <span class="glyphicon glyphicon-plus-sign">  </span>       written enquire painful ye offuces forming it</h4>    <div class="accordion-content">      <p>        lorem ipsum dolor sit amet mauris eu turpis.</p>    </div>    <h4 class="accordion-toggle">      <span class="glyphicon glyphicon-plus-sign">  </span>      in finished on speaking suitable advanced if happines</h4>    <div class="accordion-content">      <p>        vivamus facilisisnibh scelerisque laoreet.</p>    </div>    <h4 class="accordion-toggle">      <span class="glyphicon glyphicon-plus-sign"> </span>       people period twenty extent set better</h4>    <div class="accordion-content">      <p>        vivamus facilisisnibh scelerisque laoreet.</p>    </div>  </div>


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -