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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.