Only PHP
Only PHP
Update :
$updateclient = 'UPDATE name_table SET name_column = :name_column1 WHERE
name_column = :name_column2 ';
$update = $db_con->prepare($updateclient)->execute(array(
"name_column1" => $_POST["fullname"],
"name_column2" => $_GET["id"],
));
Deleted :
$deleteClient = 'DELETE FROM name_table WHERE name_column = :name_column1 ';
$deleteClients = $db_con->prepare($deleteClient);
$res = $deleteClients->execute(array(
"name_column1" => $_REQUEST["id"],
));
Upload Picture :
$uploaddir = './picturesProduit/' ; // ( ./picturesProduit/ => is the name of
the file we uploded in him the picture )
$uploadfile = $uploaddir . basename($_FILES["image"]['name']);
if (move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile)) {
$uploadimage = True;
}; // if image is uploaded succefly in the dossier $uploadimage become TRUE