kanada1986 Posted December 26, 2010 Share Posted December 26, 2010 Hello, Pls can sombody told me what i make wrong? Sorry for my bad english! And can somebody pls correkt it? <?php include_once("./../includes/config.php"); session_start(); if($_SESSION['sess_type'] == "admin") { header("Location: index.php"); die(); } else if($_SESSION['sess_type'] == "guest") { header("Location: guest.php"); die(); } if($_POST['password'] AND $_POST['username']) { $sess_pass = $_POST['password']; $sess_name = $_POST['username']; if($sess_pass == $password AND $sess_name == $username) { $_SESSION['password'] = $password; $_SESSION['alang'] = $_POST['alang']; $_SESSION['sess_type'] = "admin"; header("Location: index.php"); } else if($sess_pass == $guest_password AND $sess_name == $guest_username) { $_SESSION['password'] = $guest_password; $_SESSION['alang'] = $_POST['alang']; $_SESSION['sess_type'] = "guest"; header("Location: guest.php"); } else { header("Location: auth.php"); } } else { ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Admin System</title> <link rel="stylesheet" type="text/css" href="img/style.css"> </head> <body> <center> <p> </center> <div align="center"> </div> <td> <p align="center"> <img border="0" src="img/logo.png" width="256" height="256"></td> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%" id="table1"> <tr> <td align="center"> <table border="0" id="table2" cellspacing="0" cellpadding="0" width="539"> <tr> <td> <p align="center"></td> </tr> <tr> <td> <form id="form1" name="form1" method="post" action="auth.php"> <p align="center"> <label> <input class=m4 size="161" type="text" name="username" /> <p align="center"> <br> <input class=m4 size="161" type="password" name="password" /> </label> </p> <p align="center"><label> <input type="hidden" value="" id="hfield" name="alang"/> <input class=cssbutton type="submit" id="lbut" name="Submit" value="Enter" /><br><br> <br> </label> ~ © Veni ~</p> <p align="center">~ /Private Release/ ~</p> </form> </td> </tr> </table> </td> </tr> </table> </body> </html> <script> function changelang(tlang) { var hfield = document.getElementById('hfield'); var hlang = document.getElementById('tlang'); var hbut = document.getElementById('lbut'); hfield.value = tlang; if(tlang == 'en') { hlang.innerHTML = "English"; hbut.value = "Enter"; } else { hlang.innerHTML = "Russian"; hbut.value = "Âîéòè"; } } </script> <? } ?> Quote Link to comment https://forums.phpfreaks.com/topic/222672-parse-error-syntax-error-unexpected-end-in-cxamppxampphtdocsadminauthp/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 26, 2010 Share Posted December 26, 2010 You forgot to type the 'php' on the <?php tag near the end of your code and the closing } was not seen as being php code by the php parser. Quote Link to comment https://forums.phpfreaks.com/topic/222672-parse-error-syntax-error-unexpected-end-in-cxamppxampphtdocsadminauthp/#findComment-1151554 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.