Perkdaddy Posted June 27, 2007 Share Posted June 27, 2007 I'm having some problems with a few php pages on my website. Ever since I changed servers this "login" page is coming up but when I log in its blank. Everything else on the website is fine, its just these 2 pages. I have tried to receive help from the server guys but they say the code is, well, horrible. I just cant understand why it worked for a year and now nothing? Can someone have a look and clean it up for me??? ??? <? session_start(); include "config.inc.php"; include "functions.php"; if ($supersec=="on"){ // Super secur $name="xxxxx"; // user $pass="xxxxxx"; // pass if (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) || $HTTP_SERVER_VARS['PHP_AUTH_USER']!=$name || $HTTP_SERVER_VARS['PHP_AUTH_PW']!=$pass) { header("WWW-Authenticate: Basic realm=\"security by Admin\""); header("HTTP/1.0 401 Unauthorized"); exit("erorr login"); } error_reporting(0); set_time_limit(0); set_magic_quotes_runtime(0); $err=0; // super } ?> <body topmargin="0" leftmargin="0" bgcolor="#F4F4F4"> <div align="left"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" height="33"> <tr> <td width="100%" height="33" background="./hea.gif"> <p align="center"><a href="http://www.shababy.org"> <img border="0" src="./admin_logo.gif" width="269" height="79"></a></td> </tr> </table> </div> <p align="center"> </p> <? // Let's go .. myheader(); // Tasfeer if ($tasf){ mysql_query("update uds set clicks=0 where id='$dd'"); echo "ok succ"; echo"<meta http-equiv='Refresh' Content=2;URL='admin.php'>"; exit; } // inside secure if(!session_is_registered("admin")){ echo "<form method='post' action='login.php'> <p align='center'> username:<input type='text' name='admin' size='20'> <br> Password:<input type='password' name='pass' size='20'><br><input type='submit' value='login' name='log'></p> </form>"; myfooter(); }Else{ include "switch.php"; ?> <a href='upload.php?'>Add new rotated banner</a> <br> <table border='1' style='border-collapse: collapse' width='70%' cellspacing='2' cellpadding='2' bordercolorlight='000080' bordercolordark='000080'><tr bgcolor='BAE2F0'><td width='2'> id </td><td align='center'> url </td><td align='center'> impressions </td><td align='center'> Clicks </td><td width='150' align='center'> modifiacation </td> <td align='center'>active</td></tr> <? $query=mysql_query("SELECT * FROM uds order by id desc"); while($result=mysql_fetch_array($query)){ echo "<form method='post'><input type='hidden' name='id' value='<? echo $result[id]; ?>'></form>"; echo "<tr><td align='center'>$result[id]</td><td align='center'>$result[sname]</td><td align='center'>$result[views]</td> <td align='center'>$result[clicks]</td><td align='center'><a href='admin.php?action=edit&id=$result[id]'>edit</a>|<a href='admin.php?action=remove&id=$result[id]'>delete</a></td>"; if($result[active]=='1'){ echo "<td align='center'><a href='admin.php?action=dactive&id=$result[id]'>stop</a></td>"; }Else{ echo "<td align='center'><a href='admin.php?action=active&id=$result[id]'>active</a></td>"; } } echo "</table><br>"; echo "</form> <form method='post'> <br> make counter 0 by written id no <input type='text' name='dd' size='2'> <input type='submit' name='tasf' value='go'></form>"; myfooter(); } ?> Quote Link to comment Share on other sites More sharing options...
sushant_d84 Posted June 27, 2007 Share Posted June 27, 2007 Hey.. If U have changed the Hosting Server... then CHeck for PHP version.. Check for php.ini for Some error related dirctives in it like display_errors.........and error_reporting.......... Also Try to print mysql_error while getting logging in ... I think i u post the Link for that it will be better Quote Link to comment 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.