harkly Posted January 15, 2010 Share Posted January 15, 2010 I am trying to combine a date. The user inputs a day, month and a year separately. I want to combine them and insert into the data base. I know how to combine but not sure where I should put the code?? page1 or page2 page1 has the form and page2 updates the database right now I have the mysql_select_db('test'); $bd_day=$_POST["bd_day"]; $bd_month=$_POST["bd_month"]; $bd_year=$_POST["bd_year"]; $birth_date=$_POST["birth_date"]; $sql = "INSERT INTO user (bd_day, bd_month, bd_year, birth_date) VALUES ('$_POST[bd_day]','$_POST[bd_month]','$_POST[bd_year]','$_POST[birth_date]',NOW())"; Link to comment https://forums.phpfreaks.com/topic/188528-combing-data-and-inserting-into-db/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.