Databuilder Posted December 11, 2003 Posted December 11, 2003 I'm not clear on how sessions work, and I'm still learning PHP. I'd like to create buttons that link to login.php and create_account.php. Can someone pleae point me to the code to use to maintain state and whatever else I need to do? Much Thanks, Jason
Guest Posted December 12, 2003 Posted December 12, 2003 <a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo tep_image_button('your_login_button.png'); ?></a> <a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo tep_image_button('your_create_account_button.png'); ?></a> Note that this is in HTML context. Put the buttons in includes/languages/english/images/buttons (or whatever language). Change the button names as necessary/desired. tep_href_link will handle the session ID for you. Hth, Matt
Databuilder Posted December 12, 2003 Author Posted December 12, 2003 Thanks much for the code. Hate to ask, but any suggestions on getting it to work in define('TEXT_MAIN'? I tried escaping the single quotes, but that didn't seem to do it. Would it be easier to edit index.php? Very open to suggestions. Thanks, Jason
Guest Posted December 12, 2003 Posted December 12, 2003 I think it might be easier to edit index.php. In re: the TEXT_MAIN, you could try <a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . tep_image_button('your_login_button.png') . '</a> <a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('your_create_account_button.png') . '</a> Hth, Matt
Recommended Posts
Archived
This topic is now archived and is closed to further replies.