Hello, I am trying to make a countdown php form. Everything seems to work okay, except I cannot get the php variables to equal the html name tags. My code is below. Please let me know what I messed up, as this is my first php creation . <html> <title>Make your own countdown php script!</title> <form> <form action="upload_file.php" method="post" enctype="multipart/form-data"> Make your own countdown php script, which you can post to your site! </br> Want to add this feature to your site? Visit elvenprog.com to do so. </br></br> Event: <input type="text" size="10" maxlength="100" value="Name Your Event To Count Down To" name="event" /> </br> </br> Day: <input type="text" size="10" maxlength="100" value="Enter Day Event Will Occur" name="day" /> </br> </br> Month: <input type="text" size="10" maxlength="100" value="Enter Month Event Will Occur" name="month" /> </br> </br> Year: <input type="text" size="10" maxlength="100" value="Enter Year Event Will Occur" name="year" /> </br> </br> Hours: <input type="text" size="10" maxlength="100" value="Hours Until Event" name="hours" /> </br> </br> Minutes: <input type="text" size="10" maxlength="100" value="Minutes Until Event" name="min" /> </br> </br> Seconds: <input type="text" size="10" maxlength="100" value="Seconds Until Event" name="sec" /> </br> </br> <input type="submit" name="sub"/> </form> </html> <? $_event=$_POST['event']; $_hours=$_POST['hours']; $_year=$_POST['year']; $_seconds=$_POST['sec']; $_minutes=$_POST['min']; $_month=$_POST['month']; $_day=$_POST['day']; $target = mktime($_hours, $_minutes, $_seconds, $_month, $_day, $_year) ; $today = time () ; $difference =($target-$today) ; $days =(int) ($difference/3600) ; if ($_year>0) { echo '$event will begin in $days hours.'; } ?> Code (markup):
Hi, No problem... You need to lose the <form> Code (markup): at the top as it's replicated and confused things as it has no method nor action Also the output needs to change a little to: echo $event." will begin in ".$days." hours."; Code (markup): Hope that helps? Si