I need help here. I'm racking my brain and just don't know what to do here.

OK I have a form that has a time field that is entered into a field in the SQL

I have no problems there but now I have to allow for a 36 hour clock in which I have figured I will trigger by adding 24 hours to the time field by the use of a drop down.

example:

AM
PM
Late Night AM ( which will add 24 to the clock)

My problem is the I can't seem to get the form field into the SQL correctly

Can someoone help me please.

    not sure undertsand your question. you are asking users to enter a date/time and you want to add 36 hours?

    <?php
    if (!isset($_POST['submit']))
    {
    	echo '
    	<form action="" method="POST">
    	enter date/time: <input type="text" name="datetime"><br>
    	<input type="submit" name="submit" value="submit">
    	</form>
    	';
    }
    else
    {
    	echo 'the date/time you entered plus 36 hours is: ' . date('Y-m-d H:i:s', (strtotime($_POST['datetime']) + 129600));
    }
    ?>
    

      Ok I just realized I could have been a little more clear in my question.

      I have an mySQL db with a time field in it. I'm using its properties to allow for the 36 hour clock meaning in the db a time can read 35:45:00. I have no problem with the data in the SQL I just need to write something to allow for the user to add the time a little easier then translating 11:45:00 AM the next day into 35:45:00.

      So could someone help please.

        Originally posted by devinemke
        not sure undertsand your question. you are asking users to enter a date/time and you want to add 36 hours?

        <?php
        if (!isset($_POST['submit']))
        {
        	echo '
        	<form action="" method="POST">
        	enter date/time: <input type="text" name="datetime"><br>
        	<input type="submit" name="submit" value="submit">
        	</form>
        	';
        }
        else
        {
        	echo 'the date/time you entered plus 36 hours is: ' . date('Y-m-d H:i:s', (strtotime($_POST['datetime']) + 129600));
        }
        ?>
        

        [/B]

        This posting is only for an administrator to be entering event time to a given date. Some times on a date will need to list under the same day even after midnight. so a 36 hour clock is called for.

        For example

        04/19/05

        11:00 AM Event 1
        1:00 PM Event 2
        5:00 PM Event 3
        9:00 PM Event 4
        11:00 PM Event 5
        2:00 AM Event 6 Which falls into the next day

        Hopefullly you under stand my problem

        I have the SQL and the frontend working it's just the backend administration I need to get and the problem is to make things easier on the user.

          Thanks I got it

          What you gave me help.

          I need to convert the time to Unix Time the getdate() for an array then add the 24 to the hour but it worked out great thanks.

            Write a Reply...