+ 2
Display the day of the Given date
Write a code using html and php to get 3 numbers date,month,year and print the day of the given date using function? Can anyone give me the code for function alone,i did the form part.please help this newbie to go further.
4 ответов
+ 2
Its pretty simple, have a look at the code I put together for you. Its nice and easy to adapt to get the values from textfields.
https://code.sololearn.com/wuV9gd4dD3A4/#php
+ 2
You can either use, if(isset($_POST['button_id'])) { run the query } and use $year = $_POST['year']; etc to get the values of each textfield from the form. Or you could use jquery & Ajax to handle the posting of data to the result.
+ 1
<?php
function writeDate(){
$time = time(); //time in seconds
$date = date("d/m/Y", $time); //can change date format
echo $date;
}
writeDate(); //calling the function
?>
0
How can i fetch the data that is entered and submitted in the form to function can you please tell me that