Unholy Prayer Posted October 22, 2006 Share Posted October 22, 2006 Ok, I am making a php script where a user can add a scheduled clan match and select the date that it takes place on. How do I insert values from multiple dropdown menus into one database column? Link to comment https://forums.phpfreaks.com/topic/24771-user-date-selection/ Share on other sites More sharing options...
gmwebs Posted October 22, 2006 Share Posted October 22, 2006 Just add the variables together and then insert that value...[code]<?php//get the values POSTed from the form$day = $_POST['day'];$month = $_POST['month'];$year = $_POST['year'];$fulldate = $day . "/" . $month . "/" . $year; // will equal dd/mm/yyyy depending on what you have in your form$sql = "INSERT INTO tablename (date) VALUES('$fulldate')";mysql_query($sql) or die (mysql_error());[/code]Or something like that but you should get the idea...HTH Link to comment https://forums.phpfreaks.com/topic/24771-user-date-selection/#findComment-112797 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.