Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Dreamweaver /PHP Date question . . .

  • 03-09-2005 9:23pm
    #1
    Registered Users, Registered Users 2 Posts: 148 ✭✭


    Hi,

    Hope somemone could help me, I have the following set ups;

    My SQL file fields: User Id, Password and date

    Dreamweaver form : User ID, Password, Date

    My question is how do I default the Date field to todays date ? Is there any simple way of doing it ? either by PHP or Javascript . .

    Note : still very new to these software.

    Thanks a lot . . .


Comments

  • Registered Users, Registered Users 2 Posts: 9,280 ✭✭✭RobertFoster


    Have a look at http://ie2.php.net/date

    Define $today in whatever format you prefer - then have the value of the date field like the following:
    [php]<input type="text" value="<?php echo("$today"); ?>">[/php]


  • Registered Users, Registered Users 2 Posts: 148 ✭✭maco


    Thanks for your email, but still not diplaying correctly, as I said I am still new to this, I could have miss some thing here . . . here is the code generated by dreamveaver

    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" onSubmit="MM_validateForm('email','','RisEmail','password','','R','datime','','R');return document.MM_returnValue">
    <table align="center">
    <tr valign="baseline">
    <td width="110" align="right" nowrap>Email:</td>
    <td width="212"><input type="text" name="email" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Password:</td>
    <td><input type="text" name="password" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td> </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Register Date:</td>
    <td><input type="text" name="datime" value="<?php echo("$today"); ?>" size="20"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td> </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right"> </td>
    <td><div align="center">
    <input type="submit" value="Insert Record">
    </div></td>
    </tr>
    </table>
    <input type="hidden" name="MM_insert" value="form1">
    </form>


  • Registered Users, Registered Users 2 Posts: 148 ✭✭maco


    So sorry, got it already, forgot to define the field . . . . Thanks, you just saved me a lot if time. . .


Advertisement