display error reporting php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);// how to display php errors on your browser :
// first step, create an error function :
$errors = array();
// now you have just to insert the function like this :
if (........){
$errors['the_name_of_the_error']='the error message';
}
// example :
// we want to display an error when the user does not correctly fill,
// in the 'password' box when registering on your website :
if(empty($_POST['password']) ||
$_POST['password'] != $_POST['password_confirm']){
$errors['errors']= "You must enter a valid password";
}
Also in PHP:
- Laravel image validation example
- branch from other branch
- base64 file php
- adding spasifc date to date('Y-m-d H:i:s') php
- display_errors php.ini
- Admob server-side verification php
- Database name seems incorrect You're using the default database name laravel. This database does not exist. Edit the .env file and use the correct database name in the DB_DATABASE key.
- day in php time
- console.php
- check lenght phph
- all the ways to address a page in php
- apache php default date format 4 digits
- apt install php7.4-mbstring php7.4-zip php7.4-xml
- php random string generator
- echo php dropdown from db and save it in a db
- Create cap with php
- Target class does not exist.
- check var type php
- count rows mysql limit php
- change timestamp format php
- clear all cache laravel server
- date to string php
- Increase the PHP memory limit
- Gate::before not working laravel 8