Thread: hi

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    malaysia
    Posts
    13
    Rep Power
    0

    hi


    hi
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14

    'ello


    'ello
    -james
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    malaysia
    Posts
    13
    Rep Power
    0

    cookies


    Hi

    At present i developing one small forumsn website my self.
    So how i store username and password when i open my website next time.I mean i create username and password and i put option as "checkbox" like this 'remember me'.so i can select check option when i enter next time this page it will automatically enter forumn page directly.

    So which concept i can use for storing username and password.
    Same like in this forumn website .

    i using servlets and oracle..
    so any advice ???
    i attaching html file .hope every body can unerstood ...
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    malaysia
    Posts
    13
    Rep Power
    0
    ///this is the html file
    <html>
    <head><title>RegistrationForm</title></head>
    <body>
    <center><h2><b>RegistrationForm</b></h2></center>
    <center>
    MemberName :<input type=text><br>
    Password :<input type=password><br>
    ConfirmPassowrd :<input type=password><br>
    First Name :<input type=text><br>
    Last Name :<input type=text><br>
    Current mail :<input type=text><br>
    occupation :<input type=text><br>
    DateOfBirth :<SELECT id=birthmonth
    name=birthmonth> <OPTION selected value=""></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></SELECT>
    m&nbsp; <SELECT id=birthday name=birthday> <OPTION selected
    value=""></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>
    &nbsp;d&nbsp; <INPUT maxLength=4 name=birthyear
    size=4>yyyy&nbsp;<br>

    Gender :<INPUT id=gender name=gender type=radio value=m>Male &nbsp; <INPUT id=gender
    name=gender type=radio value=f>Female<br>

    Location :<input type=text><br>
    Homepage :<input type=text><br><br>

    <INPUT name=rememberme type=checkbox value=1> Please
    remember my member name and password for future logins.
    <br><br>
    <input type= submit>

    </center>
    </body>
    </html>
  8. #5
  9. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Well, from a jsp page, you might do something like:
    Code:
    <%@page import="javax.servlet.http.Cookie"%>
    
    <%
    usernameCookie = new Cookie( "username", request.getParameter( "username_from_form" ) );
    
    response.addCookie( usernameCookie );
    
    %>
    Then, on your other pages, you can check for the username cookie.
    Code:
    <%@page import="javax.servlet.http.Cookie"%>
    
    <%
    String username = null;
    
    Cookie[] cookies = request.getCookies();
    
    if ( cookies != null ) {
        for ( int i = 0; i < cookies.length; i++ ) {
            if ( cookies[i].getName().equals( "username" ) ) {
                username = cookies[i].getValue();
            }
        }
    }
    %>
    -james
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    malaysia
    Posts
    13
    Rep Power
    0

    thanks


    Thanks for your good comment and suggestion.

IMN logo majestic logo threadwatch logo seochat tools logo