osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 08-09-2005, 06:38 AM
Lurker
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fer_75
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 !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 08-09-2005, 08:06 AM
New Member
 
Join Date: Aug 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
KainGNX
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 08-10-2005, 12:54 AM
Lurker
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fer_75
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 08-10-2005, 08:04 AM
Lurker
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fer_75
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 !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 08-10-2005, 12:01 PM
New Member
 
Join Date: Aug 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
KainGNX
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 08-10-2005, 12:03 PM
New Member
 
Join Date: Aug 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
KainGNX
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 08-11-2005, 06:01 AM
Lurker
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fer_75
Default thank you KainGNX !

I just want to say thanks a lot KainGNX for your kindness and for your great help ! Fernando Delgado.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 08-11-2005, 06:14 AM
New Member
 
Join Date: Aug 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
KainGNX
Default RE: thank you KainGNX !

You're welcome.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 10:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax