//insertquery $insertquery = "insert into pdo_table(name,age,class,gender) values('sadia',12,11,'female') "; $dbcon->query($insertquery); //$dbcon->exec($insertquery); echo '<br>'.'inserted successful';