PHP: date function to get month of the current date

See http://php.net/date date(‘m’) or date(‘n’) or date(‘F’) … Update m Numeric representation of a month, with leading zeros 01 through 12 n Numeric representation of a month, without leading zeros 1 through 12 F Alphabetic representation of a month January through December ….see the docs link for even more options.

Can I store images in MySQL 

Yes, you can store images in the database, but it’s not advisable in my opinion, and it’s not general practice. A general practice is to store images in directories on the file system and store references to the images in the database. e.g. path to the image,the image name, etc.. Or alternatively, you may even … Read more

Using PHP 7 with WAMP

There is the answer : I was running with the last official wampserver which seems to be not compatible with php7 (I have made some tests on 4 computers with the same result of my problem). One of my colleague give me this link: http://forum.wampserver.com/read.php?1,126455 with some tutorials to update wampserver to unofficial new versions. Following this … Read more

Access PHP variable in JavaScript

You can’t, you’ll have to do something like You can also load it with AJAX rhino is right, the snippet lacks of a type for the sake of brevity. Also, note that if $php_var has quotes, it will break your script. You shall use addslashes, htmlentities or a custom function.

A non well formed numeric value encountered

Because you are passing a string as the second argument to the date function, which should be an integer. string date ( string $format [, int $timestamp = time() ] ) Try strtotime which will Parse about any English textual datetime description into a Unix timestamp (integer):

How to run a PHP function from an HTML form?

The “function” you have is server-side. Server-side code runs before and only before data is returned to your browser (typically, displayed as a page, but also could be an ajax request). The form you have is client-side. This form is rendered by your browser and is not “connected” to your server, but can submit data to the server for processing. Therefore, … Read more

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