I have made a script that gets only friday and puts them in a drop down but now i dont want to upload it into the datbase as a string i need it as timestamp so i can filter and order for current day and such.
here is the form
<?php
echo "<form action='".$_SERVER['php_self']."' method='post'> ";
print "<select name=\"start\" size=\"1\">";
print "<option value=\"Select Week\" selected>Select Week</option>";
for($i=0; $i<=6; $i++){
$num = date("d M Y", strtotime('next friday +'.$i.' week'));
print"<option value=\"{$num}\">{$num}</option> \n";
}
print "</select>";
echo "<input name='Submit' type='submit' id='start' value='Send Day'>";
echo "</form>";
and here is the upload to database part
$fridate = $_POST['start'];
$create = "INSERT INTO day (day) VALUES ('$fridate')";
$query=mysql_query($create);
if (!$query)
echo $create."<br />makes an error:<br />".mysql_error();
?>
can anyone please help me to get the timestamp for the day so i can save into the database as date and not string?