File manager - Edit - /home/autoph/public_html/connect/home/upload_profile_picture.php
Back
<?php $connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; mysql_connect('localhost','root','aee1024') or die ($connect_error); mysql_select_db('db_vts') or die($connect_error); error_reporting(1); if ( $_FILES['file']['error'] > 0 ){ echo 'Error: ' . $_FILES['file']['error'] . '<br>'; } else { $customerID = mysql_escape_string($_POST['customerID']); $fullPath = $customerID . '_' . $_FILES['file']['name']; if(move_uploaded_file($_FILES['file']['tmp_name'], 'MyProfilePicture/' .$fullPath)) { echo "File Uploaded Successfully"; } } mysql_query("INSERT INTO vts_profile_images (cust_id, file_path) VALUES('$customerID','$fullPath')"); mysql_query("UPDATE `vts_customers` SET `profile_pic`='$fullPath' WHERE `c_id`='$customerID'"); echo "<img src='MyProfilePicture/".$customerID.'_'.$_FILES['file']['name']."' width='180px' height='187px' style='image-orientation: from-image;float:left;border:1px solid lightgray;margin:2px'></img>"; ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings