<?php
try { $db = new PDO("mysql:host=localhost;dbname=test", "root", "123456"); } catch ( PDOException $e ){ print $e->getMessage(); }
if(isset($POST['paraekle']))
{
$query = $db->prepare("INSERT INTO tablo SET
sutun = ?");
$insert = $query->execute(array(
$paramiktari
));
if ( $insert ){
$last_id = $db->lastInsertId();
print "insert işlemi başarılı!";
}
}
?><form action="" method="POST">
<input type="number" name="paraekle" step="0.01" id="paraekle">
<button type="submit"> Ekle </form>