Categories
JavaScript PHP Programming WordPress

[JS & PHP] How to set cookies in JavaScript and get in PHP

There is the application I built today which required to send data between JavaScript and PHP. Therefore, instead of sending AJAX request everytime data has changed, I decided to set cookies from JS and use PHP to retrieve the cookies when needed.

Categories
PHP Programming Uncategorized WordPress

[WordPress] Deployment on Amazon EC2: Solutions to Permalinks & PHP Issues

I have recently encountered 2 issues with deploying WordPress website on Amazon EC2; Permalinks not working on Amazon EC2 and old PHP version caused the code to break.

I would like to note the solutions here in order to save hours of Googling for everyone 🙂

Categories
PHP Programming WooCommerce WordPress

[WooCommerce] รวมฟังก์ชั่น get URL หน้าต่าง ๆ

Categories
PHP Programming

[PHP] var_dump Array, Object แบบสวย ๆ งาม ๆ ใน 1 บรรทัด

Categories
WordPress WordPress Themes

[WordPress] วิธีเก็บ get_template_part ลงตัวแปร