File structure for this tutorial : config.php (database connection file) index.php (For fetching data ) genrate-excel.php (For genrating excel file ) Create a sql table tblemployee. Structure of sql table employe . Now insert some data into this table. Index.php in this file we will read the data from database. genrate-excel.php in this file we… Read More »
Functions for hashing password password_hash() password_verify() password_hash() – Syntax: string $password – Password provide by user integer $algo – Password algorithm constant(PASSWORD_DEFAULT and PASSWORD_BCRYPT) PASSWORD_DEFAULT – uses the BCrypt algorithm to create the hash PASSWORD_BCRYPT – uses the CRYPT_BLOWFISH algorithm and will return a 60 character string $options – $options have two indexes.One is cost… Read More »
1) Write the delete statement: 2) Prepare the query: 3) Bind the parameters: 4) Define the bound values: 5) Execute the query: 6) Check that the query has been performed and that the records have been successfully deleted from the database. All code together now:
1) Write the regular update statement and again, instead of values, assign the named placeholders. For example: 2) Prepare the query: 3) Bind the parameters: 4) Define the bound values: 5) Execute the query: 6) Check that the query has been performed and that the database has been successfully updated.
1) Write the regular select statement and again, instead of values, put named placeholders. For example: 2) Prepare the query: 3) Execute the query: 4) Assign the data which you pulled from the database (in the preceding step) to a variable. Here I used the parameter PDO::FETCH_OBJ that returns the fetched data as an object.… Read More »
The SQL code for the users table: 1) Write a regular SQL query but, instead of values, put named placeholders. For example: The use of placeholders is known as prepared statements. We use prepared statements as templates that we can fill later on with actual values. 2) Prepare the query: 3) Bind the placeholders to… Read More »
PDO – PHP database extension PDO (PHP Data Objects) is a PHP extension through which we can access and work with databases. Though PDO is similar in many aspects to mySQLi, it is better to work with for the following reasons: It is better protected against hackers. It is consistent across databases, so it can… Read More »
Method 1 & 2 & 3 https:///…-standards-error-fix Method 4 error_reporting(0); ini_set(‘display_errors’, ‘0’); # don’t show any errors… error_reporting(E_ALL | ~E_STRICT); # …but do log them Few more http:///…-standards-in-joomla https:///…-reporting-explained