Jump to content

code error


unknown gamer

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...