+ 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.

14th Feb 2018, 2:03 PM
subash kumar
subash kumar - avatar
4 Respuestas
+ 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
15th Feb 2018, 9:35 AM
ihateonions
+ 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.
15th Feb 2018, 11:20 AM
ihateonions
+ 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 ?>
15th Feb 2018, 9:29 AM
Ahmed Mahmud
Ahmed Mahmud - avatar
0
How can i fetch the data that is entered and submitted in the form to function can you please tell me that
15th Feb 2018, 9:49 AM
subash kumar
subash kumar - avatar