What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-02 10:05:02
basic code for file upload in php
//This is the minimal code for an image upload for first time learners //html portion <!DOCTYPE html> <html> <head> <title>ImageUpload</title> </head> <body> <form action="upload.php" method="p... Add solution -
PHP 2022-02-15 22:45:09
tutoriel insérer une image forum php
<?phpif(isset($_FILES['avatar']) AND !empty($_FILES['avatar']['name'])) { $tailleMax = 2097152; $extensionsValides = array('jpg', 'jpeg', 'gif', 'png'); if($_FILES['avatar']['size'] <= $tailleMax) { $extensionUpload = strtolower(substr(st... Add solution -
PHP 2022-02-01 06:26:05
move uploaded file in php
$upload_folder = "upload/"; $file_location = $upload_folder . basename($_FILES["fileToUpload"]["name"]); if(isset($_FILES['fileToUpload'])){ if(move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $file_loc... Add solution -
PHP 2021-11-13 19:52:26
php pdo image upload
<?php require_once "connection.php"; if(isset($_REQUEST['btn_insert'])) { try { $name = $_REQUEST['txt_name']; //textbox name "txt_name" $image_file = $_FILES["txt_file"]["name"]; $type = $_FILES[... Add solution -
Html 2021-11-02 01:23:11
how to place the path of an uploaded image in a database on an html file input
// Get the name of images $Get_image_name = $_FILES['image']['name']; // image Path $image_Path = "images/".basename($Get_image_name); $sql = "INSERT INTO student_table (imagename, contact) VALUES ('$Get_image_name', 'USA')... Add solution -
PHP 2021-10-26 16:39:09
uploader fichier serveur
<?php // Vérifier si le formulaire a été soumis if($_SERVER["REQUEST_METHOD"] == "POST"){ // Vérifie si le fichier a été uploadé sans erreur. if(isset($_FILES["photo"... Add solution
Best helpers
Ranking is empty