WordPress get_template_directory_uri() not returning https and only return http

Make sure the WordPress and Site Address URL under the general settings include https  The image shows, http, you need https get_tample_directory_uri() uses the site_url() , tacking on the name of your WordPress content directory, and the location of your theme plus its name. site_url will return http if is_ssl() is false, which depends on your General Settings, as stated above.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ””)’ at line 2

There is a single quote in $submitsubject or $submit_message Why is this a problem? The single quote char terminates the string in MySQL and everything past that is treated as a sql command. You REALLY don’t want to write your sql like that. At best, your application will break intermittently (as you’re observing) and at worst, you have just introduced … Read more

Auto increment in phpmyadmin

I have an existing database using PHP, MySQL and phpMyAdmin. When users become a member on my website, I need the system to create a unique membership number for them using a five digit number. for e.g 83773. I guess it is like generating a random password except I only want numbers for my members. … Read more

PHP variables don’t evaluate in the query [duplicate]

This happens when your result is not a result (but a “false” instead). You should change this line to this: because the ” can interprete $variables while ‘ cannot. Works fine with integers (numbers), for strings you need to put the $variable in single quotes, like If you want / have to work with single … Read more

Start and stop a timer PHP

Use the microtime function. The documentation includes example code.ShareImprove this answer Follow answered Nov 29 2011 at 12:13 Jon 408k7575 gold badges710710 silver badges780780 bronze badges Add a comment 131 You can use microtime and calculate the difference: Here’s the PHP docs for microtime: http://php.net/manual/en/function.microtime.php