What do you want to save?
Add Code snippet
New code examples
-
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 -
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 -
PHP 2021-10-03 09:18:02
file upload in php through ajax
**1. index.php** <body> <span id="msg" style="color:red"></span><br/> <input type="file" id="photo"><br/> <script type="text/javascript" src="jquery-3.... Add solution -
PHP 2021-09-30 05:53:02
image upload with name change in php
$temp = explode(".", $_FILES["file"]["name"]); $newfilename = round(microtime(true)) . '.' . end($temp); move_uploaded_file($_FILES["file"]["tmp_name"], "../img/imageDirectory/" . $newfilename); Add solution -
PHP 2021-09-25 01:23:04
php how to rename a file before saving it
$temp = explode(".", $_FILES["file"]["name"]); $newfilename = round(microtime(true)) . '.' . end($temp); move_uploaded_file($_FILES["file"]["tmp_name"], "../img/imageDirectory/" . $newfilename); Add solution -
PHP 2021-09-24 17:17:03
how to store and retrieve image from database in php
// 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-09-16 07:02:02
how to validate format and size of uploaded file via php
<?php if (isset($_POST["upload"])) { // Get Image Dimension $fileinfo = @getimagesize($_FILES["file-input"]["tmp_name"]); $width = $fileinfo[0]; $height = $fileinfo[1]; $allowed_image_extension = a... Add solution
Best helpers
Ranking is empty