Jump to content

ubuntu

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ubuntu's Achievements

Member

Member (2/5)

0

Reputation

  1. Dear all, Please help me if you know how to get today's date using php. Below is the coding, what's wrong with this? Thank you for your kind attention. Regards. <?php $today = date("D M d Y"); echo "<font size=1>$today</font>\n"; ?>
  2. Thanks bro, but can you show me a sample as I still getting error can't insert into database. This is my query: I have a table names perjalanan. With field Date_of_Depart (Date) & Time_of_Depart (Time). Inserting data command: insert into perjalanan values (14may2007, 12:00); I think mostly is the way I insert data wrong right?
  3. To simplify what I mean, below is the exact data. The time is "12:00pm", including pm with it. Then how do I insert these two values into databases? I keep getting errors when inserting.
  4. Dear all, I'm using MySQL database, the problem is I've setup that user input the Date format in dd/mm/yyyy (example: 14may2007) and Time (example: 12:00pm). How do I convert it to Date & Time format in database format before insert into database? Sorry, noob here. Any advice or suggestion are most welcome. Thank you, regards.
  5. Thank you very much bro, this is what I wanted.
  6. Dear all, I would like to create a print button for my web, the purpose is, when the user click the print button, it will show the print dialog. Anyone know how to create this? Thanks in advance. Regards.
  7. Thank you StormTheGates & Garath531, now it worked already. I wonder my pc got problem or not? After close the browser and reopen again, it worked. Regards.
  8. Bro, 1. My form didn't miss <form action="page.php" method="post"> </form> element. 2. The result display is: ++
  9. Yes, thank you StormTheGates, you are so expert! Appreciated.
  10. I want the display result as following. Display result: Jack
  11. When I press the submit button without any field selected, the results page appear without display the error message.
  12. Thank you StormTheGates, however, I've try your code, but the result display was: Let's say the username set in cookie was user1 & fullname in database is Jack Display results: select fullname from pendaftaran where username = \'user1\' or die(mysql_error()); I wonder, why it display the whole sql statement?
  13. Hello everyone, I can't display entry from database to browser, what's wrong with my code? Thank you for your kind attention. Regards. <?php $connection = mysql_connect("$host", "$user", "$password") or die(mysql_error()); $db = mysql_select_db($database, $connection) or die(mysql_error()); $sql = "select fullname from pendaftaran where username = '$_COOKIE[username]'" or die(mysql_error()); ?> <html> <title><head>Display entry from database</head></title> <body> <p><?php echo $sql; ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.