Hi,
I am larning php and have got a simple task to be completed. But my brain is not working in coding the below requirement.
This is the requirement.
Create a form that contains:
1. Name, textbox
2. Submit button
If the user inputs the Name textbox and clicks the Submit button, the system must:
1. Display "Good morning, <Name>" if the server time is within 12am-12 noon
2. Display "Hello, <Name>" if the server time is not within 12am-12 noon
<Name> is the value as inputted by the user into the textbox
How can i design using only php ? is it possible ?
<?php
if($today['hours']<=12)
echo "Good Morning <".$name.">";
else
echo "Hello ".$name;
?>
Now $today = " ? " which tag should i use to get the current date and time ?
This is just the conditions.
How to i insert a form to get the name ?