Jump to content

squiblo

Members
  • Posts

    483
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by squiblo

  1. this is the full page script, it isnt long so maybe im doing something wrong somewhere else? <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Squiblo - About Us!</title> <style type="text/css"> div#container { width: 900px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; } body { text-align: center; margin: 0; } </style> </head> <body bgcolor="#E6E6E6" text="#000000"> <div id="container"> <div id="wb_Shape1" style="position:absolute;left:55px;top:41px;width:792px;height:125px;z-index:2" align="center"> <img src="/Images/header_img.jpg" id="Shape1" align="top" alt="" title="" border="0" width="792" height="125"></div> <div id="wb_Text1" style="position:absolute;left:60px;top:85px;width:325px;height:72px;z-index:3" align="left"> <font style="font-size:70px" color="#FFFFFF" face="impact"><a href="/index.php" style="text-decoration:none"> <font color="#FFFFFF">SQUIBLO</a></font></font></div> <div id="wb_Shape2" style="position:absolute;left:54px;top:170px;width:793px;height:412px;z-index:10" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div> <?php session_start(); ?> <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> <?php if(isset($_POST['Login'])){ $_SESSION['myusername'] = $_POST['myusername']; echo ucwords(strtolower($_SESSION['myusername'])); ?> </font></div> <?php } else { ?> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?> <div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left"> <font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009</font></div> <div id="about" style="position:absolute;left:185px;top:588px;width:150px;height:44px;z-index:33" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/about.php"><font color=#000000>About Us</font></a></font></div> <div id="terms" style="position:absolute;left:285px;top:588px;width:150px;height:44px;z-index:34" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/terms.php"><font color=#000000>Terms and Conditions</font></a></font></div> <div id="contact" style="position:absolute;left:450px;top:588px;width:150px;height:44px;z-index:35" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/contact.php"><font color=#000000>Contact Us</font></a></font></div> <div id="privacy" style="position:absolute;left:555px;top:588px;width:150px;height:44px;z-index:36" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/privacy.php"><font color=#000000>Privacy</font></a></font></div> <div id="help" style="position:absolute;left:640px;top:588px;width:150px;height:44px;z-index:36" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/help.php"><font color=#000000>Help</font></a></font></div> </div> </body> </html>
  2. <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> <?php session_start(); if(isset($_POST['Login'])){ $_SESSION['myusername'] = $_POST['myusername']; } if($_SESSION['myusername']){ echo ucwords(strtolower($_SESSION['myusername'])); ?> </font></div> <?php } else { ?> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?>
  3. that works when logged in but when not logged in it shows "you are logged in as:" but not the username or the login form
  4. <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> <?php session_start(); if ($_SESSION['myusername']) echo ucwords(strtolower($_SESSION['myusername'])); ?></font></div> <?php else { echo <form name="form1" method="post" action="checklogin.php">; <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> } ?>
  5. please can anyone help me out with this
  6. everything i try doesnt work
  7. if you have a better way... show this if logged in: <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"><?php echo ucwords(strtolower($_SESSION['myusername'])); ?></font></div> show this if logged out: <form action='checklogin.php' method='POST'> <input type="text" id="username" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="username" value="" title="username"> <input type="password" id="password" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="password" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div>
  8. ok now i have changed that, when i am logged in it shows my username but nothing else and it does not have any font to it, when i am logged off it shows the correct information.
  9. Now i have this and still not working correctly <?php session_start(); if ($_SESSION['myusername']) {echo ucwords(strtolower($_SESSION['myusername'])); } else { ?></font></div> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?>
  10. the problems with this script are, - it does not show "myusername". - it does not hide the login form if i am logged in. <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> <?php if ($_SESSION['myusername']) {echo ucwords(strtolower($_SESSION['myusername'])); } else { ?></font></div> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <?php } ?>
  11. i need a php code to show this if somebody is logged in: <?php echo ucwords(strtolower($_SESSION['myusername'])); ?> or if they are not logged in show this: <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> i would prefere i without "inclusde" if possibe, please help i dont know where to start
  12. when using "a href=""" to link text to another page it automatically underlines the text that is being linked, what cud i use instead of "a href=""" to link to another page and not have the text underlined?
  13. how do i make the username taken from the database always start with a capital letter? <?php echo $_SESSION['myusername']; ?>
  14. my domain is squiblo.com if i type into the url squiblo.com/kjbdvnbjf.php (basically something that does not exist) it comes up with that page saying "No input file specified" how can i change this message or link it to one of my other pages with a PHP script and where would i put the script?
  15. where im my script should i put the timeout part becauce im not sure
  16. this is the script i have now <?php session_start(); print_r($_SESSION); if(!isset($_SESSION['myusername'])){ header("location:index.php"); // set timeout period in seconds $inactive = 600; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['start']; if($session_life > $inactive) { session_destroy(); header("Location: logout.php"); } } $_SESSION['timeout'] = time(); exit; } ?>
  17. any1 know how to correct it?
  18. the redirecting part is fine i can do that, i do not if the time code is correct or even in the correct place
  19. i get Array ( [timeout] => 1248446158 ) then if i refresh page i get Array () refresh again to get Array ( [timeout] => (different number))
  20. this code: <?php session_start(); print_r($_SESSION); if(!isset($_SESSION['myusername'])){ header("location:index.php"); // set timeout period in seconds $inactive = 600; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['start']; if($session_life > $inactive) { session_destroy(); header("Location: logout.php"); } } $_SESSION['timeout'] = time(); exit; } ?> gave: Array ( [timeout] => 1248446158 )
  21. i cant find what is wrong with it still
  22. can u place it anywhere in the script?
  23. i changed to 3 seconds and it doesnt work, also how do i view my errors? im using "Core FTP" if that even makes a difference
  24. will the redirect and timeout parts of the script work, ive basically put two together, and i dont want to wait 20mins to see if it has worked <?php session_start(); if(isset($_SESSION['myusername'])){ header("location:profile.php"); // 20 mins in seconds $inactive = 1200; $session_life = time() - $_session['timeout']; if($session_life > $inactive){ header("Location: logoutpage.php"); } S_session['timeout']=time(); exit; ?>
×
×
  • 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.