Kaigai Blog living abroad in my twenties

【My Study Load】PHP CODING

PHP Programming

PHP CODING

Crypt the password

$password = crypt($_POST["password"], '$5$rounds=5000$usesomesillystringforsalt$');

Validate whether the user upload the file

if (is_uploaded_file($_FILES['file']['tmp_name'])) {
    /* File path to upload */
    $file_path = "../upload-img/";
    move_uploaded_file($_FILES['file']['tmp_name'], $file_path .$fileName);
}

print_r()

// This was used to check what the form "post" is sending
print_r($_POST);

print_r() is a built-in function in PHP that is used to print human-readable information about a variable.