Skip to content

Tag: database

Ajax request to php with empty POST data

I am new to javascript and I have problem with an ajax POST to php. I am trying tosend javascript variables to php via an ajax POST but it doesn’t work. The ajax post is sent but it sends empty POST. I got alert “Error occured ! 202” when trying to save data to bdd. Thanks in advance for hel…

PHP inserting value only once

I am trying to add categories in a database. Things is the script is reading the categories from a product list, therefore there are duplicate values as it’d be like reading PRODUCT NAME – DETAIL 1 – DETAIL 2 – CATEGORY Rinse and repeat. I have my code down and the insert works but it …

Query database for last modified date

I am trying to query my WordPress server to echo the date of the last modified post. In this case the database name is local and I am checking the posts table. My current code is close to what I need, it will display the date and time as Y-m-d H:i (2021-01-13 12:18) How do remove the time and display