Results 1 to 8 of 8

how can I add a log in form to my home page...

This is a discussion on how can I add a log in form to my home page... within the osCommerce 2.2 Discussion forums, part of the osCommerce 2.2 Forums category; I use oscommerce in my web site and I'd like to add a log in option in my home page(not ...

      
  1. #1
    Lurker
    Join Date
    Aug 2005
    Posts
    4
    Rep Power
    0


    Default how can I add a log in form to my home page...

    I use oscommerce in my web site and I'd like to add a log in option in my home page(not only in catalog), When I insert the "log in" form in my home page (using dream weaver mx) i can not access sucesfully using the oscommerce database, user and password ... (it looks like password is encrypted inside the data base). What can I do to read the plain, or unencrypted password???... Gracias anticipadamente !

  2. #2
    New Member
    Join Date
    Aug 2005
    Posts
    9
    Rep Power
    0


    Default

    Is your form submitting to login.php? If you are using the WYSIWYG part of Dreamweaver, check to make sure it didn't throw in any extra stuff.

    The password is encrypted in the database.
    The tep_validate_password() function is used to encrypt the value entered by your users and then that is matched against your database.

    It sounds like your form is submitting to page without the proper code to hit against the DB although it can be a vast array of things depending on how you are putting this into your page.

    Look in your login.php file and you will see the code for checking the form and the way the form should be output to the user through default functions.

  3. #3
    Lurker
    Join Date
    Aug 2005
    Posts
    4
    Rep Power
    0


    Default thank you KainGNX !

    I will check everything, now I'm reading a lot just to understand better how it works, i just want to say tanks a lot for your fast reply.

  4. #4
    Lurker
    Join Date
    Aug 2005
    Posts
    4
    Rep Power
    0


    Default How can my form submit to login.php ????

    Hi KainGNX, could you please explain how can I do my form submitting to login.php ???

    Should I call the tep_validate_password() function from my form code??... how can i do it ?

    It looks so simple, but finally I've been trying for hours and hours...

    Gracias mil anticiadamente !

  5. #5
    New Member
    Join Date
    Aug 2005
    Posts
    9
    Rep Power
    0


    Default RE: How can my form submit to login.php ????

    as long as your form has a action="login.php" it will submit to the login.php, but you should use tep_draw_form() function to output the start of your form. You do not have to call tep_validate_password() the login script does that for you.
    you code should look something like this for the login form
    Code:
    <table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
                      <tr>
                        <td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>
                      </tr>
                      <tr>
                        <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
                      <tr>
                        <td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td>
                        <td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>
                      </tr>
                      <tr>
                        <td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>
                        <td class="main"><?php echo tep_draw_password_field('password'); ?></td>
                      </tr>
                      <tr>
                        <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
                      <tr>
                        <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>
                      </tr>
                      <tr>
                        <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
                      </tr>
                      <tr>
                        <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                          <tr>
                            <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                            <td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
                            <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table></form>
    You may havea problem with the constants displaying the proper text for forgotten password etc to the user if you put this form in another file. If so then just change the constant to a string as a quick fix, and you can make it say whatever you want.

  6. #6
    New Member
    Join Date
    Aug 2005
    Posts
    9
    Rep Power
    0


    Default RE: How can my form submit to login.php ????

    Oops I forgot a very important line of code. this will start you form, put this before the code i just posted
    Code:
    <?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
    and that should be all

  7. #7
    Lurker
    Join Date
    Aug 2005
    Posts
    4
    Rep Power
    0


    Default thank you KainGNX !

    I just want to say thanks a lot KainGNX for your kindness and for your great help ! Fernando Delgado.

  8. #8
    New Member
    Join Date
    Aug 2005
    Posts
    9
    Rep Power
    0


    Default RE: thank you KainGNX !

    You're welcome.

Similar Threads

  1. Product detail page as the home/main page???
    By sukarya in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 02-17-2006, 06:21 AM
  2. Catagories on the home page!
    By pthurmond in forum osCMax v1.7 General Mods Discussion
    Replies: 3
    Last Post: 08-01-2005, 10:47 AM
  3. Integrate contrib into template | home page
    By damnedpig in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 07-28-2005, 06:18 AM
  4. Where do I edit the Home Page
    By emikey24 in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 04-11-2005, 03:38 AM
  5. Make www.mydomain.co.uk the home page
    By Vick2004uk in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 01-03-2005, 04:24 PM

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
  •