SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: date

  1. #1
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    date

    i split the date from my database and display it separately for time and day
    as follows
    2009-06-23
    06:02:03
    but i want it to be displayed as june 6, 2009
    wat shud be done?

  2. #2
    Non-Member DelvarWorld's Avatar
    Join Date
    Jul 2004
    Location
    Baloney
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?php
    $s 
    $_GET['i'];
    $sql2="SELECT * FROM circular where id='$s'";
    $result1=mysql_query($sql2); 
    $nr mysql_num_rows$result1);
    $rows=mysql_fetch_array($result1)?>
    <table>
      <tr> 
        <?php 
      ?>
      <tr>
        <td width="22" valign="top" align="center" ><p><strong><font face="Verdana"><?php echo $rows['topic']; ?></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong><font size=-1><font color='#808080'><?php echo $rows['datetime']; ?></font></font></a></p>
          <p>&nbsp;</p></td>
      </tr>
      <td width="473" valign="top" ><pre class="alt2" dir="ltr" style="
            margin: 0px;
            padding: 6px;
            border: 1px inset;
            text-align: left;
            overflow: auto"><code style="white-space:nowrap"><!-- php buffer start --><code><?php echo nl2br($a_answer); ?>
            </code>
            </pre></td>
      </tr>
      <tr> 
    </table>
    where n how shud i replace here?

  4. #4
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ever get the feeling you're helping the same people who are undercutting you for jobs?

  5. #5
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sneha,

    Seriously. You need to look into SQL injection. Google it. Please. Please. Please.

    Your database is one malicious or curious user away from being dropped.

  6. #6
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ever get the feeling you're helping the same people who are undercutting you for jobs?
    i din understand wat u intended to say?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •