Insert data to table in php/mysql & automated insert date

964

user table:

User_ID
Username
Password

campus table:

Campus_ID
Campus_name
Campus_Addres
Campus_DateCreate

edit campus table

Edit_ID
Campus_DateEdit
User_ID
Campus_ID

I have 3 tables, when i edit data using form, I want in table edit campus, automated insertedUser_ID, andCampus_ID, and the date automated inserted from current date. how do I do this with PHP syntax?

594

Answer

Solution:

in php use

date("Y-m-d H:i:s") 

for datetime fields

People are also looking for solutions to the problem: php - Install OwnCloud with PostgreSQL - Not Authenticating on Ubuntu 12.04LTS

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.