Snippets tagged “error-handling”
7 snippets use this tag.
- How do I display a MySQL error in PHP for a long query that depends on the user input?PHP
To display a MySQL error in PHP for a long query that depends on user input, you can use the mysqli_error() function.
- How to Fix "Headers Already Sent" error in PHPPHP
One of the common errors that you can meet in PHP is the “Headers already sent” error. Here, we are going to show you the solution to such an error.
- How to properly set up a PDO connectionPHP
To set up a PDO connection, you will need to do the following:
- imagecreatefromjpeg and similar functions are not working in PHPPHP
There could be a few reasons why the imagecreatefromjpeg function and similar functions are not working in your PHP script.
- mysql_fetch_array() expects parameter 1 to be resourcePHP
It looks like you are trying to use a function from the MySQL extension in PHP, but you are getting an error saying that the first parameter should be a resource.
- mysqli or PDO - what are the pros and cons?PHP
mysqli and PDO are both PHP extensions used for interacting with databases.
- phpmailer - The following SMTP Error: Data not acceptedPHP
The "SMTP Error: Data not accepted" is a common error message that can occur when using the PHPMailer library to send email messages.