unknown gamer Posted April 15, 2008 Share Posted April 15, 2008 Hi, i have this code (i didn't write) i'm new to php but i have this code and there is an error. it's not a big code and i think it is easy to fix but i don't know how. <?php require "config.php";session_start(); if (isset ($_SESSION['loggedin']) && isset ($_SESSION['time'])){ echo "Welcome, ".$_SESSION['loggedin']."!<br /><a href='login.php'>Log Out</a>";}else{?><form action="login.php" method="post" name="login"> Username: <input type="text" name="username" value="<?php if (isset ($_COOKIE['username'])){print $_COOKIE['username'];}?>" size="20" /><br /> Password: <input type="password" name="password" value="<?php if (isset ($_COOKIE['password'])){print base64_decode ($_COOKIE['password']);}?>" size="20" /><br /> <?php if ($display_bot_image_login) { $imgtxt = rand(1000,9999); print "<input type=\"hidden\" name=\"realcode\" value=\"".md5($imgtxt)."\" />"; print "Enter the number below:<input type=\"text\" name=\"code\" size=\"4\" maxlength=\"4\" /><br /><img src=\"makeimg.php?imgtxt=".base64_encode ($imgtxt)."\" /><br />"; print "<br />"; } ?> Remember Password? <input type="checkbox" name="rmbpw" <?php if (isset ($_COOKIE['password'])){print "checked=checked";} ?> /> <input type="submit" value="Login" name="login" <?php if ($_COOKIE['tries'] <= 0 && isset ($_COOKIE['tries'])) {print 'disabled="disabled"'; } ?> /> </form><? if ($allow_guest_to_register) { ?> <a target="_blank" href="register.php">Not a member? Register!</a> <? } ?> <a target="_blank" href="rawr.php">Forgot password?</a> Link to comment Share on other sites More sharing options...
Ingolme Posted April 15, 2008 Share Posted April 15, 2008 Can you tell us the error message you're being shown when you try to execute the page? Link to comment Share on other sites More sharing options...
unknown gamer Posted April 15, 2008 Author Share Posted April 15, 2008 um, i get no error on the page but i know it is an error.my friend said i had error show off or something.the page it is executed on is:http://unknowngamer.fxts.net Link to comment Share on other sites More sharing options...
Ingolme Posted April 15, 2008 Share Posted April 15, 2008 Well, that only makes things a lot more difficult. One question: have you made sure you didn't leave a line break or space right before the beggining of the code?Or is there any text echoed in config.php? Link to comment Share on other sites More sharing options...
jeffman Posted April 15, 2008 Share Posted April 15, 2008 I haven't checked thoroughly, but I suspect it needs a closing brace added to the end of the code:<?php } ?> Anyway, it couldn't hurt to try. Link to comment Share on other sites More sharing options...
unknown gamer Posted April 15, 2008 Author Share Posted April 15, 2008 Well, that only makes things a lot more difficult. One question: have you made sure you didn't leave a line break or space right before the beggining of the code?Or is there any text echoed in config.php?You win!! it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.