Jump to content

User Date Selection


Unholy Prayer

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.