0

hello friend,
i require help for forget password
please provide code for this
please

Thank u in advance

Rakesh Nagekar

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by saikishore
0

Hello Mr.Rakesh...

Please go through this attachment...
let me know if any problem....

Attachments
<?
include_once("functions.php");

if($_SERVER['REQUEST_METHOD']=='POST' ){
	
	$frq="select userid,password,fname from users where email='".$_POST['email']."'";
	$fres=mysql_query($frq);
	$frcnt=mysql_num_rows($fres);
	
	if($frcnt==1){
		$frow=mysql_fetch_assoc($fres);		
		 $message='
		<style type="text/css">
		<!--
		body,td,th {
			color: #666666;
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 11px;
		}
		a {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 11px;
		}
		body {
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
		}
		-->
		</style>
		
		<table width="70%" border="0" align="center" cellpadding="1" cellspacing="0">
          <tr>
            <td bgcolor="#636363"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td colspan="3"><table border="0" cellpadding="0" cellspacing="0" >
    <tr>
        <td><img src="images/top_banner_left.jpg" width="610" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>
        <td><img src="images/top_bar_nav_block.gif" width="71" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>

        <td><img src="images/top_banner_right.jpg" width="60" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>
   </tr>   
</table></td>
              </tr>
              <tr>
                <td colspan="3">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3">&nbsp;&nbsp;Dear&nbsp;'.$frow['fname'].',</td>
              </tr>
              <tr>
                <td width="17%">&nbsp;</td>
                <td width="17%">&nbsp;</td>
                <td width="83%"><strong>Welcome to London Metal Exchange </strong></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>Please Ffind Your Login Details Here. </td>
              </tr>
              <tr>
                <td colspan=3><table width=30% border=0 align=center cellpadding= 0 cellspacing=1 bgcolor=#359D00>
                    <tr>
                      <td bgcolor=#4C9C21><table width=100% border=0 align=center cellpadding=5 cellspacing=0>
                          <tr bgcolor=#FFFFFF>
                            <td width=49% align=right nowrap><strong>User Id </strong> </td>
                            <td width=2% >:</td>
                            <td width=49%align=left>'.$frow['userid'].'</td>
                          </tr>
                          <tr bgcolor=#FFFFFF>
                            <td align=right><strong>Password</strong></td>
                            <td>:</td>
                            <td align=left>'.$frow['password'].'</td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td colspan="3">Regards,</td>
              </tr>
              <tr>
                <td colspan="3"><strong><img id="_image6" hspace="0" vspace="0" src="images/lme-logo.gif" style="border-style:None;height:45px;width:101px;border-width:0px;" /></strong></td>
              </tr>
            </table></td>
          </tr>
        </table>
		';	
				
		$mailheader  = 'MIME-Version: 1.0' . "\r\n";
		$mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		$mailheader .='From:London Metal Exchange'. "\r\n";	
		$to=$_POST['email'];	
		 @mail($to,'Your Account Details',$message,$mailheader);			
		echo '<script language="javascript">window.location.href="forgotpassword.php?msg";</script>';
		
	} else {
		$dupmsg="User with this E-mail Id doesnot existed.";
	}

	
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
<head>
<title>LME Free Data Service</title>
        <LINK REL="stylesheet" href="Styles/styles.css">
        <LINK REL="stylesheet" href="/scripts/typestyles.css">
        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name=vs_defaultClientScript content="JavaScript">

<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
        <link href="images/typestyles.css" rel="stylesheet" type="text/css">
</head>    
    <BODY BGCOLOR="#999999" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" CLASS="background">    
    
<form name="form1" method="post" action="" onSubmit="javascript:return check();" >
   <script language="javascript">
function check()
{
	var d=document.form1;
	if(trimstr(d.email.value)==''){alert("Please Enter E-Mail ID");d.email.focus();return false;}
	var m = document.form1.email.value
	var cnt=0,spc=0,dot=0;
	for(var i=1;i<=m.length;i++){
		if(m.charAt(i)=="@")cnt++;
		if(m.charAt(i)==" ")spc++;
		if(m.charAt(i)==".")dot++;
	}
	lnm=m.length
	if(cnt==0||cnt>1||spc!=0||dot==0 ||lnm<=2 ){alert("Please Enter A Valid E-Mail Id");document.form1.email.focus(); return false;	}
}
function trimstr(str) {
	str= this != window? this : str;
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
                      </script>
<script src="/Data/WebResource.axd?d=w2QLexZB8F61HR0E_CSpcg2&amp;t=632914301152153464" type="text/javascript"></script>
<script src="/Data/WebResource.axd?d=OBV1YqpiQsAX4T0tJtK7uiqcjSi6TRtnLiMdAin8dPs1&amp;t=632914301152153464" type="text/javascript"></script>
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
// -->
</script>

    
<table border="0" cellpadding="0" cellspacing="0" width="741">
    <tr>
        <td><img src="images/top_banner_left.jpg" width="610" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>
        <td><img src="images/top_bar_nav_block.gif" width="71" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>
        <td><img src="images/top_banner_right.jpg" width="60" height="74" alt="London Metal Exchange - The world centre for non-ferrous metal trading" border="0" /></td>

   </tr>   
</table>      
<TABLE WIDTH="733" BORDER="0" CELLSPACING="0" CELLPADDING="0">
        
<TR ALIGN="LEFT" VALIGN="TOP"> 
            
<TD WIDTH="16" ROWSPAN="4"></TD>
            
<TD><img id="_image1" hspace="0" vspace="0" src="images/plastic-logo.gif" style="border-style:None;height:12px;width:139px;border-width:0px;" /></TD>
            
<TD><img id="_image2" hspace="0" vspace="0" src="images/spacer.gif" style="border-style:None;height:5px;width:13px;border-width:0px;" /></TD>
            
<td><img id="_image3" hspace="0" vspace="0" src="images/spacer.gif" style="border-style:None;height:5px;width:420px;border-width:0px;" /></TD>
            
<TD><img id="_image4" hspace="0" vspace="0" src="images/spacer.gif" style="border-style:None;height:5px;width:13px;border-width:0px;" /></TD>
            
<Td><img id="_image5" hspace="0" vspace="0" src="images/spacer.gif" style="border-style:None;height:5px;width:128px;border-width:0px;" /></TD>

        
</TR>
        
<TR ALIGN="LEFT" VALIGN="TOP">         
            
<TD WIDTH="139">
                
<TABLE WIDTH="101%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
                    
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=2 width="101%" border=0>
    <TBODY>
        <TR><TD><img id="_menu_Image2" hspace="0" vspace="0" src="images/gray.gif" style="border-style:None;height:1px;width:101px;border-width:0px;" /></TD></TR>        
    </TBODY>
</TABLE><table id="_subMenu__subMenu" cellspacing="0" cellpadding="2" border="0" style="border-width:0px;border-style:None;width:100%;border-collapse:collapse;">

	<tr id="_subMenu__trHome">
		<td id="_subMenu_Tablecell1" NAME="Tablecell1"><a id="_subMenu__home" class="mainnav" href="login.php">Home</a></td>
	</tr><tr id="_subMenu_TablerowSpacer1" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_Tablecell11x" NAME="Tablecell5"></td>
	</tr><tr id="_subMenu__trdailyStocksPricesMetals">
		<td id="_subMenu_Tablecell15"></td>
	</tr><tr id="_subMenu_TablerowSpacer1x" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_Tablecell11xx" NAME="Tablecell5"></td>

	</tr><tr id="_subMenu_Tablerow2" NAME="_trMigratedHeader_Underline">
		<td id="_subMenu_Tablecell54" NAME="Tablecell6"><img id="_subMenu_Image6" hspace="0" vspace="0" src="images/gray.gif" style="border-style:None;height:1px;width:101px;border-width:0px;" /></td>
	</tr><tr id="_subMenu__trSteelsPriceGraphs">
		<td id="_subMenu_Tablecell59"></td>
	</tr><tr id="_subMenu_TablerowSpacer2x" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_Tablecell12x" NAME="Tablecell5"></td>
	</tr><tr id="_subMenu_TablerowSpacer2" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_Tablecell12" NAME="Tablecell5"></td>
	</tr><tr id="_subMenu__trSettlement">

		<td id="_subMenu_Tablecell21"></td>
	</tr><tr id="_subMenu_TablerowSpacer3" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_TableSpacerCell1" NAME="Tablecell5"></td>
	</tr><tr id="_subMenu_TablerowSpacer3x" NAME="Tablerow1" style="height:20px;">
		<td id="_subMenu_TableSpacerCell1x" NAME="Tablecell5"></td>
	</tr><tr>
		<td style="height:5px;"></td>
	</tr><tr>
		<td style="height:5px;"></td>

	</tr>
</table>
</TD></TR>
                
</TABLE>

            
</TD>
            
<TD WIDTH="13">&nbsp;</TD>
            
<TD WIDTH="420">
<P><SPAN CLASS="titletext">LME Free Data Service</SPAN><BR><BR>
<SPAN CLASS="bodytextbold">Forgot Password</SPAN>
</P>
<p class="errormsg"> <? if(isset($dupmsg)) echo $dupmsg;?>  </p>
<SPAN CLASS="bodytext">Please enter the email address you supplied on registering for the LME Free Data Service in the textbox below to recei
0

Hello Mr.Rakesh...

Please go through this attachment...
let me know if any problem....

Thanks madam..
it is useful to me also....
it is working fine..but small changes require in database(i mean variables) ...thats not a big problem..
thanks for giving very accurate & fast reply...KEEP IT UP

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.