Jump to content

Dyno

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Dyno's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks everyone for the input i'll check out everything tomarrow while i'm at work.
  2. Hi there, i've really been instrested on learning how to do php/mysql programming but i'm not sure the best way to get into this. i've looked through a few book that i've got from the library but they didnt seem to help, i havent looked thorugh the tutorials here yet i'll do that tomarrow. I'm just wondering on how all of you learnt and might be a good way for me to learn, i seem to learn better when i can try stuff instead of reading 100% of the time. Is there any good websites that can help or books that you've used that's helped you. I dont mind spending money because i'm sure this i something id like to continue for a while. Any information would be great. Thanks, Dyno
  3. Ok so i downloaded some good code to help my website integrate with phpBB the code i'm using is <? class PHPBB_Login { function PHPBB_Login() { } function login( $phpbb_user_id ) { global $db, $board_config; global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID; // Setup the phpbb environment and then // run through the phpbb login process // You may need to change the following line to reflect // your phpBB installation. require_once( './forums/config.php' ); define('IN_PHPBB',true); // You may need to change the following line to reflect // your phpBB installation. $phpbb_root_path = "./forums/"; require_once( $phpbb_root_path . "extension.inc" ); require_once( $phpbb_root_path . "common.php" ); return session_begin( $phpbb_user_id, $user_ip, PAGE_INDEX, FALSE, TRUE ); } function logout( $session_id, $phpbb_user_id ) { global $db, $lang, $board_config; global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID; // Setup the phpbb environment and then // run through the phpbb login process // You may need to change the following line to reflect // your phpBB installation. require_once( './forums/config.php' ); define('IN_PHPBB',true); // You may need to change the following line to reflect // your phpBB installation. $phpbb_root_path = "./forums/"; require_once( $phpbb_root_path . "extension.inc" ); require_once( $phpbb_root_path . "common.php" ); session_end( $session_id, $phpbb_user_id ); // session_end doesn't seem to get rid of these cookies, // so we'll do it here just in to make certain. setcookie( $board_config[ "phpbb2mysql" ] . "_sid", "", time() - 3600, " " ); setcookie( $board_config[ "phpbb2mysql" ] . "_mysql", "", time() - 3600, " " ); } } ?> once i click the remember me box and go back to the index it asks me to login again but i want it to hold the login. Any help would be nice thanks
  4. i still dont know what i'm doing wrong it should be holding the login but its not
  5. can someone please tell me if its possible i think it is
  6. Anyone know why it isnt holding the login
  7. Hi, i'm looking for a Login Script Where On My Site i'll Have The Defualt Layout with Links on the left hand side. But if someone logs in it will give them extra links that only logged in members can see. right now i have my site integrated with phpBB so when they login. i'm just wondering if its easy to add extra links once there logged in. Thanks Dyno
  8. Thanks for that it worked great. The only thing i cant get working is the cookie that keeps me logged in. <? class PHPBB_Login { function PHPBB_Login() { } function login( $phpbb_user_id ) { global $db, $board_config; global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID; // Setup the phpbb environment and then // run through the phpbb login process // You may need to change the following line to reflect // your phpBB installation. require_once( './forums/config.php' ); define('IN_PHPBB',true); // You may need to change the following line to reflect // your phpBB installation. $phpbb_root_path = "./forums/"; require_once( $phpbb_root_path . "extension.inc" ); require_once( $phpbb_root_path . "common.php" ); return session_begin( $phpbb_user_id, $user_ip, PAGE_INDEX, FALSE, TRUE ); } function logout( $session_id, $phpbb_user_id ) { global $db, $lang, $board_config; global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID; // Setup the phpbb environment and then // run through the phpbb login process // You may need to change the following line to reflect // your phpBB installation. require_once( './forums/config.php' ); define('IN_PHPBB',true); // You may need to change the following line to reflect // your phpBB installation. $phpbb_root_path = "./forums/"; require_once( $phpbb_root_path . "extension.inc" ); require_once( $phpbb_root_path . "common.php" ); session_end( $session_id, $phpbb_user_id ); // session_end doesn't seem to get rid of these cookies, // so we'll do it here just in to make certain. setcookie( $board_config[ "phpbb2mysql" ] . "_sid", "", time() - 3600, " " ); setcookie( $board_config[ "phpbb2mysql" ] . "_mysql", "", time() - 3600, " " ); } } ?> thats the code used can anyone see where its not working. the cookie name on the forum is phpbb2mysql
  9. On my website i have a login username/password box i have it when you enter your login details it'll log you into the forums. When no ones loged in theres no problems but when someone logs in i get the error on my index page On my sessions.php file those 2 lines are Line 254 setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); Line 255 is blank On my index-test.php file the php code is <?php define('IN_PHPBB', true); $phpbb_root_path = 'forums/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length); init_userprefs($userdata); if(!$userdata['session_logged_in']) { echo ' '; ?> <form method="post" action="forums/login.php"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username: <input class="post" type="text" name="username" size="12" style="font-family: Arial; font-size: 10px; border: 1px solid #808080"/><br> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password: <input class="post" type="password" name="password" size="7" style="font-family: Arial, font-size: 10px; border: 1px solid #808080"/> <br>Remember Me: <input class="text" type="checkbox" name="autologin" /> <input type="submit" class="mainoption" name="login" value="Log in" style="border: 1px solid #333333; font-family:Arial; font-size:10px; color:#000000; text-transform:uppercase; background-color:#E9E9E9" /> <br> <font size="1" face="verdana, Arial, Helvetica, sans-serif"> <img src="forums/templates/DustyGreen/images/icon_mini_search.gif" border="0" align="middle"> <a href="forums/search.php">Search</a> <img src="forums/templates/DustyGreen/images/icon_mini_register.gif" border="0" align="middle"> <a href="forums/profile.php?mode=register">Register</a></font> </form> <?php } else { echo '<font size="2" face="Arial, verdana, Helvetica, sans-serif">Hi, '.$userdata['username'] ; echo '</font><br><font size="1" face="Arial, verdana, Helvetica, sans-serif">'; echo '<img src="forums/images/folder.gif" border="0" align="middle"> <a href="'.append_sid("forums/privmsg.php?folder=inbox").'" title="Private Messages">Inbox</a> ['.$userdata['user_new_privmsg'].']'; echo ' <img src="forums/images/icon_mini_profile.gif" border="0" align="middle"> <a href="'.append_sid("forums/profile.php?mode=editprofile").'" title="Edit profile">Profile</a><br>'; echo '<img src="forums/images/icon_mini_search.gif" border="0" align="middle"> <a href="'.append_sid('forums/search.php').'">'.$lang['Search'].'</a>'; echo ' <img src="forums/images/icon_mini_search_new.gif" border="0" align="middle"> <a href="'.append_sid('forums/search.php?search_id=newposts').'">'.$lang['Last_Post'].'</a><br>'; echo '<img src="forums/images/icon_mini_login.gif" border="0" align="middle"> <a href="'.append_sid('forums/login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']).'">Logout</a> </font><br>'; } ?> I"m not sure why i'm getting that error if someone can help me fix it i'd be happy thanks.
  10. That worked good, but i wanted to use the phpBB database but when they login at that screen it takes you to the custom page i made for logged in members. sorta like a basic website but with specific options only for logged in members Thanks
  11. nevermind i'm stupid i figured it out.
  12. nope i have the ?> tag, it goes <?php <html> <body> </body> </html> ?> at the end.  Anything else
  13. i'm very new to php and mysql but whenever i try to enter my <?php into the body of my html document.  i get the error Parse error: syntax error, unexpected '<' in /home/adaminc/public_html/temp/index.php on line 169 thats the line i put <?php on.
  14. Anyone know anything about this? i'm still looking for help on this
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.