Search Results

Search found 3 results on 1 pages for 'datentime'.

Page 1/1 | 1 

  • Anything wrong with this php code?

    - by Hwang
    1st I have to say I know nothing bout php. I was actually doing my AS3 guest-book and through parts of tutorials from Activetut, I managed to come out a flash guest-book. So the problem now I'm facing is the guest-book could only inject 1 XML data and it will always clear off the old 1, while the flash is still caching on the old XML files. I'd found some other tutorials(which I think its quite hard since i dunno anything about php) and comparing to the php code I'm using, it seems to be extremely short. I have no idea what the code does, so currently I'm not sure whether the problems came from the php or my AS3. <?php if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){ $xml = $GLOBALS["HTTP_RAW_POST_DATA"]; $file = fopen("wish.xml","wb"); fwrite($file, $xml); fclose($file); } ?> and below is my correct XML format: <WISHES> <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH> <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH> </WISHES> So anyone kind to explain what that php code does? cause it replace my XML with: <WISH> <NAME>Test</NAME> <EMAIL>[email protected]</EMAIL> <DATENTIME>2/3/10</DATENTIME> <MESSAGE>Dummy Message</MESSAGE> </WISH>

    Read the article

  • Mysql table data problem?

    - by DaTeNtImE
    I'm new to mysql and was wondering how can I add the users birthdate in the following HTML format to the MYSQL table data listed below? How would the structure look like for example email VARCHAR(80) NOT NULL,? Here is the HTML code below. <li><label>Date of Birth: </label> <label for="month">Month: </label> <select name="month" id="month"> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <label for="day">Day: </label> <select id="day" name="day"> <option value="0" selected="selected">Day</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <label for="year">Year: </label><input type="text" name="year" id="year" /></li> Here is the MySQL table data. CREATE TABLE users ( user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, first_name VARCHAR(20) NOT NULL, last_name VARCHAR(40) NOT NULL, email VARCHAR(80) NOT NULL, pass CHAR(40) NOT NULL, user_level TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, active CHAR(32), registration_date DATETIME NOT NULL, PRIMARY KEY (user_id), UNIQUE KEY (email), INDEX login (email, pass) );

    Read the article

  • Adding time zone hours difference to time

    - by Hwang
    I know there's a much better and correct way to do it, but i need a temporarily solutions. I need to add in extra hours to the time, and the day will change automatically too. How should I change the code below? package { public class getTime { private var today:Date=new Date(); private var hour:uint=today.getHours(); private var minute:uint=today.getMinutes(); private var month:uint=today.getMonth(); private var monthArray:Array=new Array('January','February','March','April','May','June','July','August','September','October','November','December'); private var time:String = getUSClockTime(today.getHours(), today.getMinutes()); public var dateNtime:String=(time+", " +today.getDate()+" "+monthArray[month]+" "+today.getFullYear());; public function getTime() { } private function getUSClockTime(hrs:uint, mins:uint):String { var modifier:String="PM"; var minLabel:String=doubleDigitFormat(mins); if (hrs>12) { hrs=hrs-12; } else if (hrs == 0) { modifier="AM"; hrs=12; } else if (hrs < 12) { modifier="AM"; } return (doubleDigitFormat(hrs) + ":" + minLabel + " " + modifier); } private function doubleDigitFormat(num):String { if (num<10) { return ("0" + num); } return num; } } }

    Read the article

1