ShadowAS1 Posted July 8, 2011 Share Posted July 8, 2011 Hi, I'm Creating a website atm but something in my PHP is wrong. I'm Trying to create an Login Form using MySQL but it doesn't seem to work. Even when there are value's in the fields it returns: You haven't completely filled out the form (see my code ) Thanks ShadowAS1 [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/ Share on other sites More sharing options...
AyKay47 Posted July 8, 2011 Share Posted July 8, 2011 Can you please paste the code to this thread Don't use $_SERVER['PHP_SELF'] as a form action...you can use "#" instead... Another Language = Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240249 Share on other sites More sharing options...
ShadowAS1 Posted July 8, 2011 Author Share Posted July 8, 2011 Ok, well It is semi-working now: Now it gives me this error when logging in correctly (other errors are fine) Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php: in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 193 Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php: in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 195 Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php: in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 201 PHP File: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Project: </title> <meta name="description" content="" /> <meta name="keywords" content="" /> <link href="script/style.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]><link href="script/ie.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE 7]><link href="script/ie7.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <div id="wrapper"> <div id="header"> <p><span>rev.:</span> <strong>0.5B1</strong></p> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> </div> <!--header ends--> <a href="#" id="logo" title="Corporate Layout" class="replace"><span>Corporate Layout</span></a> <!--<form id="search_form" action="search"> <p><input type="text" value="Search this site for..." /> <input type="submit" id="submit" value="" /></p> </form> <!--form ends--> <!-- <div id="banner"> <img src="images/banner.jpg" alt="" /> </div> <!--banner ends--> <div id="navigation"> <ul> <li class="active"><a href="#">Home</a></li> <li><a href="#">OVER</a></li> <li><a href="#">LOGIN</a></li> <li><a href="#">REGISTREER</a></li> <li><a href="#">HELP</a></li> <li><a href="#">FAQS</a></li> <li><a href="#">Contact </a></li> </ul> </div> <!--navigation ends--> <div id="content"> <div id="left_column"> <div class="text"> <h2>Welkom</h2> <p>Beschrijving....</p> </div> <!--text ends--> <div class="text alternative"> <h2>EVT. 2e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> <div class="text"> <h2>EVT. 3e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> </div> <!--left column ends--> <div id="right_column"> <div class="heading"> <h2>Login:</h2> </div> <!--heading ends--> <ul> <form action="#" method="post"> <li><input type="text" name="username" value="Gebruikersnaam." /></li> <li><input type="password" name="pass" value="Wachtwoord." /></li> <li><input type="submit" name="submit" id="submit" value="Login" /></li> </form> <li> <?php // Connects to your Database mysql_connect("localhost", "*snap*", "*snap*") or die(mysql_error()); mysql_select_db("*snap*") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ShadowAS1.com'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['USR_ShadowAS1.com']; $pass = $_COOKIE['Key_ShadowAS1.com']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: member.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('Login formulier niet volledig ingevuld!'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('Sorry, We kunnen je gebruikersnaam niet vinden in de database.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Wachtwoord incorret.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(USR_ShadowAS1.com, $_POST['username'], $hour); setcookie(Key_ShadowAS1.com, $_POST['pass'], $hour); //then redirect them to the members area header("Location: member.php"); } } } else { // if they are not logged in } ?> </li> </ul> <div class="heading"> <h2>Koptekst 1</h2> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> <div class="heading"> <h2>Koptekst 2</h2> <img src="images/comments_icon.jpg" alt="" /> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> </div> <!--right column ends--> </div> <!--content ends--> </div> <!--wrapper ends--> <div id="footer"> <div id="footer_content"> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> <p> © 2011 ShadowAS1.com. All Rights Reserved</p> </div> <!--footer content ends--> </div> <!--footer ends--> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240250 Share on other sites More sharing options...
Zane Posted July 8, 2011 Share Posted July 8, 2011 http://www.phpfreaks.com/forums/index.php?topic=95562.0 Explains it all. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240252 Share on other sites More sharing options...
AyKay47 Posted July 8, 2011 Share Posted July 8, 2011 also http://www.phpfreaks.com/forums/index.php?topic=37442.0 Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240255 Share on other sites More sharing options...
ShadowAS1 Posted July 8, 2011 Author Share Posted July 8, 2011 Okay, Well i read them both.. As far as I understand it's due to my scripts sets an cookie and then does header(Location:) But by reading the posts you guys linked I do not quite get how to solve it. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240257 Share on other sites More sharing options...
Pikachu2000 Posted July 8, 2011 Share Posted July 8, 2011 HTML is output. There's a ton of it. Most of it is before any header() or setcookie(). Does that help? Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240260 Share on other sites More sharing options...
ShadowAS1 Posted July 8, 2011 Author Share Posted July 8, 2011 Yeah I already figured that PHP would see HTML as output to by reading about the BOM stuff. So I placed my PHP script before the HTML. But still it shows the error. The only difrrence (ofcourse) is that the text is now ontop of the page Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240261 Share on other sites More sharing options...
Zane Posted July 8, 2011 Share Posted July 8, 2011 Your error Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php: in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 193 Notice how, in your code, that you don't even open your PHP tag until just after all your HTML? All that HTML is output.. in other words, the browser sees the HTML before your header() funciton call.... as well as all the cookies and such. In order to alleviate these errors, you needn't put HTML before the <?php tag... simple as that. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240262 Share on other sites More sharing options...
Pikachu2000 Posted July 8, 2011 Share Posted July 8, 2011 Okay, well post the revised code and paste in the new error messages. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240263 Share on other sites More sharing options...
Zane Posted July 8, 2011 Share Posted July 8, 2011 So I placed my PHP script before the HTML. But still it shows the error. This is exactly like saying, I washed all the dishes but I forgot to use soap and water they're still dirty. Not only does there have to NOT be output before the <?php tag, but there cannot be any output before header functions Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240264 Share on other sites More sharing options...
ShadowAS1 Posted July 8, 2011 Author Share Posted July 8, 2011 @Zanus: Okay.. Now i'm confused New Errors: Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php:1) in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 118 Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php:1) in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 120 Warning: Cannot modify header information - headers already sent by (output started at /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php:1) in /home/rubenvb48/domains/shadowas1.com/public_html/passport/index.php on line 126 New code: <?php // Connects to your Database mysql_connect("localhost", "", "") or die(mysql_error()); mysql_select_db("rubenvb48_passport") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ShadowAS1.com'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['USR_ShadowAS1.com']; $pass = $_COOKIE['Key_ShadowAS1.com']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: member.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('Login formulier niet volledig ingevuld!'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('Sorry, We kunnen je gebruikersnaam niet vinden in de database.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Wachtwoord incorret.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(USR_ShadowAS1.com, $_POST['username'], $hour); setcookie(Key_ShadowAS1.com, $_POST['pass'], $hour); //then redirect them to the members area header("Location: member.php"); } } } else { // if they are not logged in } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Project: </title> <meta name="description" content="" /> <meta name="keywords" content="" /> <link href="script/style.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]><link href="script/ie.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE 7]><link href="script/ie7.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <div id="wrapper"> <div id="header"> <p><span>rev.:</span> <strong>0.5B1</strong></p> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> </div> <!--header ends--> <a href="#" id="logo" title="Corporate Layout" class="replace"><span>Corporate Layout</span></a> <!--<form id="search_form" action="search"> <p><input type="text" value="Search this site for..." /> <input type="submit" id="submit" value="" /></p> </form> <!--form ends--> <!-- <div id="banner"> <img src="images/banner.jpg" alt="" /> </div> <!--banner ends--> <div id="navigation"> <ul> <li class="active"><a href="#">Home</a></li> <li><a href="#">OVER</a></li> <li><a href="#">LOGIN</a></li> <li><a href="#">REGISTREER</a></li> <li><a href="#">HELP</a></li> <li><a href="#">FAQS</a></li> <li><a href="#">Contact </a></li> </ul> </div> <!--navigation ends--> <div id="content"> <div id="left_column"> <div class="text"> <h2>Welkom</h2> <p>Beschrijving....</p> </div> <!--text ends--> <div class="text alternative"> <h2>EVT. 2e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> <div class="text"> <h2>EVT. 3e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> </div> <!--left column ends--> <div id="right_column"> <div class="heading"> <h2>Login:</h2> </div> <!--heading ends--> <ul> <form onsubmit="emptyForm();" action="#" method="post"> <li><input type="text" name="username" value="Gebruikersnaam." /></li> <li><input type="password" name="pass" value="Wachtwoord." /></li> <li><input type="submit" name="submit" id="submit" value="Login" /></li> </form> <li> </li> </ul> <div class="heading"> <h2>Koptekst 1</h2> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> <div class="heading"> <h2>Koptekst 2</h2> <img src="images/comments_icon.jpg" alt="" /> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> </div> <!--right column ends--> </div> <!--content ends--> </div> <!--wrapper ends--> <div id="footer"> <div id="footer_content"> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> <p> © 2011 ShadowAS1.com. All Rights Reserved</p> </div> <!--footer content ends--> </div> <!--footer ends--> </body> </html> Edit: This script was to be edited anyways: Cause I'd want to remove header(location:) what I wanted to do was to Replace the login form by text like: Welcome: $user Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240266 Share on other sites More sharing options...
AyKay47 Posted July 8, 2011 Share Posted July 8, 2011 you could also use an output buffer... http://us.php.net/manual/en/ref.outcontrol.php Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240268 Share on other sites More sharing options...
Pikachu2000 Posted July 8, 2011 Share Posted July 8, 2011 Output buffering is nothing but a hack to cover up poorly written code. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240270 Share on other sites More sharing options...
Pikachu2000 Posted July 8, 2011 Share Posted July 8, 2011 Judging by the fact that the output starts on line 1, there's a pretty good chance of a BOM being present. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240271 Share on other sites More sharing options...
ShadowAS1 Posted July 8, 2011 Author Share Posted July 8, 2011 Okay, You were right.. BOM was present (thought dreamweaver would fix that) removed it. Now it throws me an Internal Server Error EDIT: Nevermind. It was servers fault It couldn't find its 404 Error document xD Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240274 Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2011 Share Posted July 8, 2011 And since the output is occurring before the <?php tag, using any of the output buffering statements in the code would have no affect on the problem anyway. Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240275 Share on other sites More sharing options...
ShadowAS1 Posted July 9, 2011 Author Share Posted July 9, 2011 Fixed it now. Thanks to all of you for the quick reply's one more question. As i already said I based this script on a tutorial one. Now I want instead of doing the header(location) thingy the login form to be replaced with text like: Hello user... Contents don't matter all I want to know is how to do it. I googled it but I couldn't find a good answer Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240486 Share on other sites More sharing options...
wildteen88 Posted July 9, 2011 Share Posted July 9, 2011 You'd justwrap your login form in an if statement which checks to see if the user is logged in. If they're not logged in they display the login form. If they are logged in show the "hello user" text Example code. <?php if($your_variable_here_to_determin_whether_the_user_is_logged_in) { // display "hello user text"; echo "Hello, $username...."; // change $username to your username variable } else { ?> your login form html here <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240489 Share on other sites More sharing options...
ShadowAS1 Posted July 9, 2011 Author Share Posted July 9, 2011 EDIT: It doesn't Throw internal server error.. This was my fault.. But by logging in correctly it shows an empty page OKay now I've got my page like this: <?php // Connects to your Database mysql_connect("localhost", "", "") or die(mysql_error()); mysql_select_db("") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ShadowAS1.com'])) //if there is, it logs you in and directes you to the members page { $loggedin = true; $username = $_COOKIE['USR_ShadowAS1.com']; $pass = $_COOKIE['Key_ShadowAS1.com']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Project: </title> <meta name="description" content="" /> <meta name="keywords" content="" /> <link href="script/style.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]><link href="script/ie.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE 7]><link href="script/ie7.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <div id="wrapper"> <div id="header"> <p><span>rev.:</span> <strong>0.5B1</strong></p> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> </div> <!--header ends--> <a href="#" id="logo" title="Corporate Layout" class="replace"><span>Corporate Layout</span></a> <!--<form id="search_form" action="search"> <p><input type="text" value="Search this site for..." /> <input type="submit" id="submit" value="" /></p> </form> <!--form ends--> <!-- <div id="banner"> <img src="images/banner.jpg" alt="" /> </div> <!--banner ends--> <div id="navigation"> <ul> <li class="active"><a href="#">Home</a></li> <li><a href="#">OVER</a></li> <li><a href="#">LOGIN</a></li> <li><a href="#">REGISTREER</a></li> <li><a href="#">HELP</a></li> <li><a href="#">FAQS</a></li> <li><a href="#">Contact </a></li> </ul> </div> <!--navigation ends--> <div id="content"> <div id="left_column"> <div class="text"> <h2>Welkom</h2> <p>Beschrijving....</p> </div> <!--text ends--> <div class="text alternative"> <h2>EVT. 2e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> <div class="text"> <h2>EVT. 3e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> </div> <!--left column ends--> <div id="right_column"> <div class="heading"> <h2>Login:</h2> </div> <!--heading ends--> <ul> <form onsubmit="emptyForm();" action="#" method="post"> <li></li> <li>User Is Ingelod</li> <li></li> </form> <li> </li> </ul> <div class="heading"> <h2>Koptekst 1</h2> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> <div class="heading"> <h2>Koptekst 2</h2> <img src="images/comments_icon.jpg" alt="" /> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> </div> <!--right column ends--> </div> <!--content ends--> </div> <!--wrapper ends--> <div id="footer"> <div id="footer_content"> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> <p> © 2011 ShadowAS1.com. All Rights Reserved</p> </div> <!--footer content ends--> </div> <!--footer ends--> </body> </html> <?php } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('Login formulier niet volledig ingevuld!'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('Sorry, We kunnen je gebruikersnaam niet vinden in de database.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Wachtwoord incorret.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(USR_ShadowAS1.com, $_POST['username'], $hour); setcookie(Key_ShadowAS1.com, $_POST['pass'], $hour); //then redirect them to the members area header("Location: member.php"); } } } else { // if they are not logged in ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Project: </title> <meta name="description" content="" /> <meta name="keywords" content="" /> <link href="script/style.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]><link href="script/ie.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE 7]><link href="script/ie7.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <div id="wrapper"> <div id="header"> <p><span>rev.:</span> <strong>0.5B1</strong></p> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> </div> <!--header ends--> <a href="#" id="logo" title="Corporate Layout" class="replace"><span>Corporate Layout</span></a> <!--<form id="search_form" action="search"> <p><input type="text" value="Search this site for..." /> <input type="submit" id="submit" value="" /></p> </form> <!--form ends--> <!-- <div id="banner"> <img src="images/banner.jpg" alt="" /> </div> <!--banner ends--> <div id="navigation"> <ul> <li class="active"><a href="#">Home</a></li> <li><a href="#">OVER</a></li> <li><a href="#">LOGIN</a></li> <li><a href="#">REGISTREER</a></li> <li><a href="#">HELP</a></li> <li><a href="#">FAQS</a></li> <li><a href="#">Contact </a></li> </ul> </div> <!--navigation ends--> <div id="content"> <div id="left_column"> <div class="text"> <h2>Welkom</h2> <p>Beschrijving....</p> </div> <!--text ends--> <div class="text alternative"> <h2>EVT. 2e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> <div class="text"> <h2>EVT. 3e Tekst</h2> <p>Beschrijving</p> </div> <!--text ends--> </div> <!--left column ends--> <div id="right_column"> <div class="heading"> <h2>Login:</h2> </div> <!--heading ends--> <ul> <form onsubmit="emptyForm();" action="#" method="post"> <li><input type="text" name="username" value="Gebruikersnaam." /></li> <li><input type="password" name="pass" value="Wachtwoord." /></li> <li><input type="submit" name="submit" id="submit" value="Login" /></li> </form> <li> </li> </ul> <div class="heading"> <h2>Koptekst 1</h2> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> <div class="heading"> <h2>Koptekst 2</h2> <img src="images/comments_icon.jpg" alt="" /> </div> <!--heading ends--> <ul> <li><span>Mogelijke</span> invulling</li> </ul> </div> <!--right column ends--> </div> <!--content ends--> </div> <!--wrapper ends--> <div id="footer"> <div id="footer_content"> <ul> <li class="no_bg"><a href="#">home</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">help</a></li> <li><a href="#">contact</a></li> </ul> <p> © 2011 ShadowAS1.com. All Rights Reserved</p> </div> <!--footer content ends--> </div> <!--footer ends--> </body> </html> <?php } ?> But logging in correctly gives Internal Server Error Quote Link to comment https://forums.phpfreaks.com/topic/241442-code-returning-wrong-error/#findComment-1240500 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.