PHP mail function doesn’t complete sending of e-mail

Although there are portions of this answer that apply to only to the usage of themail() function itself, many of these troubleshooting steps can be applied to any PHP mailing system. There are a variety of reasons your script appears to not be sending emails. It’s difficult to diagnose these things unless there is an obvious … Read more

Fatal error: Call to undefined function sqlsrv_connect()

This helped me get to my answer. There are two php.ini files located, in my case, for wamp. One is under the php folder and the other one is in the C:\wamp\bin\apache\Apachex.x.x\bin folder. When connecting to SQL through sqlsrv_connect function, we are referring to the php.ini file in the apache folder. Add the following (as per your version) to this file:

Send attachments with PHP Mail()?

I agree with @MihaiIorga in the comments – use the PHPMailer script. You sound like you’re rejecting it because you want the easier option. Trust me, PHPMailer is the easier option by a very large margin compared to trying to do it yourself with PHP’s built-in mail() function. PHP’s mail() function really isn’t very good. … Read more

php foreach with multidimensional array

You can use foreach here just fine. I think you are used to accessing the data with numerical indicies (such as $row[0]), but this is not necessary. We can use associative arrays to get the data we’re after.

Unexpected Exception: SQLSTATE[HY000] [1045] Access denied for user ****@’localhost’ (using password: YES)

Sometimes Access denied Exception Error because your mysql credentials are invalid. Secondly, from my experience i observed that this also happens because you did not set password to your database connectivity. eg } Try and set password to your database connectivity. I had such experience and after changing my Collation to utf8_general_ci on the Operations … Read more

Php include not working? function not being included

Sometimes the current directory isn’t what you expect it to be, such as when you include a file from an included file. I like to use $_SERVER[‘DOCUMENT_ROOT’] on my includes so that I can always reference them absolutely from the root of my site: If your includes directory is above your document root, you can use .. to still … Read more

mysqli::query(): Couldn’t fetch mysqli

Probably somewhere you have DBconnection->close(); and then some queries try to execute . Hint: It’s sometimes mistake to insert …->close(); in __destruct() (because __destruct is event, after which there will be a need for execution of queries)

Prioritize Visible Content WordPress

I am running a WordPress site and created a custom theme. Now I’m stuck with optimizing it for Google PageSpeed. It shows the following for the Mobile page: Consider Fixing: Only about 63% of the final above-the-fold content could be rendered with the full HTML response This appears since I’ve included the Featured Image above … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)