Hi. I have HTML form and i need php code when i want to subtract something from coulmn in mysql database.
Something like



<form action="objednat_potvrdenie.php" method="post">

Meno: <input type="text" name="meno"><br>
Priezvisko: <input type="text" name="prie"><br>
Mesto: <input type="text" name="mesto"><br>
Ulica: <input type="text" name="ulica"><br>
PSČ: <input type="text" name="psc"><br>
Počet kusov: <input type="text" name="p_k" id="p_k"><br>
Kód produktu: <input type="text" name="k_p" id="k_p"><br>

<input type="submit" value="Objednať">


I want ask for sql, php, and demo pleaseee.

$link = new MySQLi(

if ($link->connect_error)
    die("Could not connect to $name database server: " . $link->connect_error);

if (!$link->select_db($db_name))
    die("Could not find $db_name database");

$link->real_query("DELETE FROM table WHERE row = 123");

Written from memory. Might have typos.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.