Jump to content

UnknownPlayer

Members
  • Posts

    269
  • Joined

  • Last visited

    Never

Everything posted by UnknownPlayer

  1. I have another problem :S I converted m.d.Y H:i:s, but when i try to convert d.m.Y H:i:s, i cant save in mysql i get echo for this date 01.01.1970 01:00:00. Example: $str = $_POST['date']; $datum = strtotime(str_replace('.','/',$str)); ...mysql save code... .. this code works for this format m.d.Y H:i:s, but when i make a format to read from mysql like d.m.Y H:i:s, and then try to save with $datum = strtotime(str_replace('.','/',$str));, i get 01.01.1970 01:00:00. Help pls
  2. And what to set, latin1 or what? :S
  3. I need to set MySQL connection collation for that chars ? Can u tell me how set all that?
  4. Can u give me example, for this date: 07.13.2010 01:25:50 ?
  5. How can i convert from "m.d.Y H:i:s" to timestamp? Example: 1278977150 = 07.13.2010 01:25:50 .. now how can i convert from 07.13.2010 01:25:50 to 1278977150, what is the function?
  6. I cant save in mysql these chars čćđš, i need some settings for mysql then i can save, is that true?
  7. How can i save in mysql latin chars (čćđš) ?
  8. This will work when i get some string values from mysql and put in this function ?
  9. When i wonna test: $text1 = "This"; $text2 = "This"; if ($text1 == $text2) - true it works when text is same, but when i wonna test this one: $text1 = "This"; $text2 = "this"; if ($text1 == $text2) - false it is true but "T" char is first var i upper, but in second var "t" is lower, how can i get that both are true, i mean how can i test this string, but with upper and lower?
  10. How can i add mysql help, i mean, when i start typing mysql_* to show me all available commands? And if someone can give me all good configures for dreamweaver?
  11. How can i pust in mysql characters like šđčćž, and later to use that characters in php code(for echo) ?
  12. This is the code, when i click on this <select> i wonna to appear new <select>, next to first one, with new items. Any idea how i can do that? <p><b>Departman:</b> <select name="departmani"> <?php echo "<option value=\"izaberi\">-- Izaberite Departman</option>"; $query = "SELECT * FROM departmani"; $result = mysql_query($query, $connection); for ($i = 0; $i < mysql_num_rows($result); $i++) { $dep = mysql_result($result, $i, "departman"); echo "<option value=\"{$dep}\">{$dep}</option>"; } ?> </select></p>
  13. Can someone tell me how can i put when click on some value on <select>, to put new <select> list new to this list with sub items?
  14. Thanks andrewgauger, it works like u said..
  15. I have problem with table in my page :S First problem with this code: <?php $query = "SELECT * FROM prijave ORDER BY date ASC"; $result = mysql_query($query, $connection); $i = 0; while ($prijava = mysql_fetch_array($result)) { $i++; if ($i % 2) { $bgcolor = "#EEEEEE"; } else { $bgcolor = "#E0E0E0"; } $date = $prijava['date']; $show_date = date("H:i:s m/d/Y", $date); echo ' <tr> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['ime'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['prezime'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['ispit'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$show_date.' </font> </td> </tr> '; } ?> .. there is a picture of this problem: And second option, i mean same thing but problem in tds :S <?php $query = "SELECT * FROM prijave ORDER BY date ASC"; $result = mysql_query($query, $connection); $i = 0; while ($prijava = mysql_fetch_array($result)) { $i++; if ($i % 2) { $bgcolor = "#EEEEEE"; } else { $bgcolor = "#E0E0E0"; } $date = $prijava['date']; $show_date = date("H:i:s m/d/Y", $date); echo ' <table border="1px" width="70%"> <tr> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['ime'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['prezime'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$prijava['ispit'].' </font> </td> <td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'"> <font face="Arial" size="2"> '.$show_date.' </font> </td> </tr> </table> '; } ?> Picture:
×
×
  • 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.