Mysql
 sql >> Datenbank >  >> RDS >> Mysql

php Bilder hochladen und Dateinamen in mysql speichern

Ändern Sie einfach dies:

//Upload text artwork
$textname= $_FILES['textname']['name'];
$tmp_textname= $_FILES['textname']['tmp_name'];
$textsubmitbutton= $_POST['submit'];
$textposition= strpos($textname, "."); 
$textfileextension= substr($textname, $textposition + 1);
$textfileextension= strtolower($textfileextension);

if (isset($textname)) {

$textpath= 'uploads/';

if (!empty($textname)){
if (move_uploaded_file($tmp_textname, $textpath.$textname)) {
echo 'Uploaded!';