Ryanz Posted March 25, 2008 Share Posted March 25, 2008 Hey ... This is a forgotten password page php script ... I didn't write it ... and I have no clue what the problem could be. There is an error in the php, the page just doesn't load. I've checked the includes with other pages, and they work fine. It's a pretty big script, I've looked through it 100 times and cannot see how it shouldn't work. I'm not a php pro though ... I'm hoping you guys can help! <?php session_start(); ob_start(); include("include/db.inc.php"); if($_SESSION['lang']=='') { $_SESSION['lang'] = "en"; } include 'languages/lang.'.$_SESSION['lang'].'.php'; $db1 = new db; $db1->open(); if(isset($_POST['submit'])) { $email=$_POST['email']; $sql = "select * from user where email='$email'"; $x=mysql_query($sql) or die(mysql_error()); $res=mysql_fetch_array($x); if($res) { $to=$_POST['email']; $body= _UR_US_NM_.$res['uname']. _AND_UR_PWD_ .$res['password'].""; $sub= _UR_LST_PWD_." www.Zimph.com"; $header=""._FROM_.":[email protected]"; $mx=mail($to,$sub,$body,$header); ?> <script language="javascript"> alert("<?=_UR_VRF_CODE_SENT_UR_MAIL_."<br>"._THNK_U_?>"); window.location.href="index.php"; </script> <? }else{ ?> <script language="javascript"> alert("your email mail address is incorrect please enter correct email address"); window.location.href="lost_pass.php"; </script> <? } } ?> <? @include("include/vars.inc.php"); ?> <script src="include/validation.js"></script> <script type="text/javascript" language="JavaScript"> function regvalid() { var Name=trim(document.form1.Name.value); if(is_empty(Name)) { alert(" <?=_ENTER_UR_EMAILID_?>"); document.form1.Name.focus(); return false; } var Password=trim(document.form1.Password.value); if(is_empty1(Password)) { alert(" <?=_ENTER_UR_PWD_?>"); document.form1.Password.focus(); return false; } return true; } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="friends networking sharing photos finding friends blogs journals blogging journaling bands, zimph, music rate pics join groups forums classifieds online social networking" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Description" content="Zimph is a site like facebook, its an exact clone of facebook for those who want to run their own social networking site, photos, friends, groups, events, bulletin, networks, messages, pokes and much more. find and make your friends here" /> <meta name="Keywords" content="facebook clone, facebook script, exact facebook clone, social networking site like facebook, site for friends, networks, photos, groups, events, bulletin, myspace clone, myspace script, personal chatrooms" /> <meta name="rating" content="General"/> <meta name="classification" content="Web Development, social networking site, facebook clone, facebook script"/> <meta name="coverage" content="Worldwide"/> <meta name="title" content="LittleCroatia | an exact facebook clone developed by influxive technologies"/> <meta name="page-topic" content="products, services, technology, business, Internet, Web, friends, photos, networks, connections, events, groups, relations"/> <meta name="audience" content="all, experts, advanced, professionals, business, youth, children, ladies, females, males"/> <meta name="author" content="Influxive Technologies website development"/> <title><? echo _TITLE_ ?></title> <link href="<?=_BASEURL_?>/css/style.css" rel="stylesheet" type="text/css" /> <link href="<?=_BASEURL_?>/css/base.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="<?=_BASEURL_?>/favicon.ico" /></head> <body> <table width="800" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="133" height="100%"> <table width="800" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="100%" colspan="2"><? include("newheader2.php"); ?></td> </tr> <tr> <tr> <td width="133" valign="top"><form name="loginform" method="post" action="" onSubmit="return regvalid();"> <table width="133" border="0" cellspacing="0" cellpadding="0" class="lineimg" bgcolor="#efefef" > <? if($_REQUEST['msg']=="loginfail"){echo "<tr><td colspan=3 align=center><font color='red'><br>"._ID_NOT_MATCH_."</font></td></tr>";}?> <? if($_REQUEST['msg']=="blocked"){echo "<tr><td colspan='2'><font color='red'>"._ACCOUNT_BLOCK_PL_CONTACT_ADMIN_."</font></td></tr>";}?> <? if($_REQUEST['msg']=="deactive"){echo "<tr><td colspan='2'><font color='red'>"._ACCOUNT_DEACTIVATED_."</font></td></tr>";}?> <? if($_REQUEST['msg']=="deactiveblock"){echo "<tr><td colspan='2'><font color='red'>"._ACCOUNT_DEACTIVATED_BLOCKED_."</font></td></tr>";}?> <tr> <td class="normaltextblack" colspan="2"><br /><?=_EMAIL_?></td> </tr> <tr> <td colspan="2" valign="top"><input type="text" name="email" class="whiteselect" size="30" onFocus="if(this.value=='USERNAME'){this.value='';}" onBlur="if(this.value==''){this.value='USERNAME';}" style="width:110px; height:20px"/></td> </tr> <tr height="20px"> <td colspan="2" class="normaltextblack" valign="bottom"><?= _PASSWORD_?></td> </tr> <tr> <td colspan="2"><input type="password" name="Password" class="whiteselect" size="30" onFocus="if(this.value=='PASSWORD'){this.value='';}" onBlur="if(this.value==''){this.value='PASSWORD';}" style="width:110px; height:20px" /></td> </tr> <tr><td width="131"> </td></tr> <tr> <td colspan="2"><input type="submit" class="inputsubmit" value="<?=_LOGIN_?>" name="submit" size="30" /> <input type="button" value="<?=_REGISTER_?>" name="register" class="inputsubmit" onClick="window.location.href='register.php'" /></td> </tr> <tr><td> </td></tr> </table> </form> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"> <div style="margin-top:3px"><a href="setlanguage.php?lang=en"><img src="img/ukflag.jpg" alt="uk flag" border="0" /></a> <a href="setlanguage.php?lang=cn"> <img src="img/taiwanflag.jpg" alt="taiwan flag" border="0"/></a></div> <br> <? /*include("flyer_show.php")*/?> </td> </tr> </table> </td> <td valign="top" width="667px"><table width="100%" border="0" background="img/tdbackbar620p.png" style="border-collapse:collapse" > <tr> <td valign="top"><br /> <table width="70%" align="center" border="1" style="border-collapse:collapse" bordercolor="#3B5998" bgcolor="#FFFFFF"> <tr><td> <form name="frm1" action="" method="post"> <table width="100%" align="center" border="0" style="border-collapse:collapse; border-color:#3B5998" bgcolor="#FFFFFF"> <tr> <td colspan="3"><br /><div align="center"><strong class="home-title"><?=_LOST_PWD_?> </strong></div><br /> </td> </tr> <tr><td colspan="3" class="normaltextblack"><p align="center"><?=_IF_U_HV_LST_UR_PWD_CLK_RST_?></p> </td> </tr> <tr><td width="29%"><div align="right"><b class="normaltext"><?=_UR_MAIL_ADR_?><br /> <br /> </b></div></td> <td colspan="2"> <input type="text" name="email" size="30" class="whiteselect" style="height:20px"/> <br /></td> </tr> <tr><td> </td> <td width="27%"><div align="right"><br /> <input type="submit" value="<?=_RESET_?>" name="submit" class="inputsubmit"/> </div></td> <td width="44%"><div align="left"><br /> <input type="button" value="<?=_CANCEL_?>" name="cancel" class="inputsubmit" onClick="javascript:window.location='index.php'" /> </div></td></tr> </table> </form> </td></tr></table><br /> <br /> </td> </tr> </table> </td> </tr> <tr><td></td><td valign="top"> <? include("nf.php");?><br> <? include("banner_inc.php");?> <div align="center"><?=bannerBottom(6)?></div><br> </td></tr> </table> </td> </table> </body> </html> Thanks loads! MOD EDIT: use ... [/CODE] tags Link to comment https://forums.phpfreaks.com/topic/97876-script-not-working-s/ Share on other sites More sharing options...
eddierosenthal Posted March 25, 2008 Share Posted March 25, 2008 i think you are going to have to turn on all debugging tools, including modifying your php.ini file, and do a lot of echo "here i am" at selected points in script. the turning on all errors will alert you to some stuff when you bring it into a browser. you might have to temporarily comment out the ob_start line because i think that will eat all your echo statements and you won't see where you've gotten to in your code. Divide and Conquer! hth Link to comment https://forums.phpfreaks.com/topic/97876-script-not-working-s/#findComment-500810 Share on other sites More sharing options...
Ryanz Posted March 25, 2008 Author Share Posted March 25, 2008 i think you are going to have to turn on all debugging tools, including modifying your php.ini file, and do a lot of echo "here i am" at selected points in script. the turning on all errors will alert you to some stuff when you bring it into a browser. you might have to temporarily comment out the ob_start line because i think that will eat all your echo statements and you won't see where you've gotten to in your code. Divide and Conquer! hth Thanks for the reply .. how can I get errors to display? Link to comment https://forums.phpfreaks.com/topic/97876-script-not-working-s/#findComment-500811 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.