CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Code problem

Print topic Send  topic

Author Message
dynamiconcepts

Posts: 17
Posted: 12/10/2004, 12:42 AM

Can anyone tell me whats wrong with this code?

global $Request;
$db = new clsDBlocalhost();
$db->query("SELECT * FROM users WHERE"");
email=\"".$Request->email->Value."\$db->next_record();
if($db->f("email") == ""){
$Request->Errors->AddError("\n"."Sorry! We could not find this Email address in our records.");
}


Thank you
View profile  Send private message
Martin K.
Posted: 12/10/2004, 1:32 AM

global $Request;
$db = new clsDBlocalhost();
if($Request->email->GetValue <> "")
$email = CCDLookUP("email", "users", "email=" . CCToSQL($Request->email->GetValue, ccsText) . "", $db);
if($email == "")
$Request->Errors->AddError("\n"."Sorry! We could not find this Email address in our records.");


dynamiconcepts

Posts: 17
Posted: 12/10/2004, 1:37 AM

So i think my problem is here as well then?

global $Request;
$db = new clsDBlocalhost();
$to = $Request->email->GetText();
$UserName=CCDLookUp("username", "users","email = ".CCToSql($to,ccsText),$db);
$Password=CCDLookUp("password", "users", "email = ".CCToSql($to,ccsText),$db);
$subject = "Re: Forgotten Username/Password";
You requested your login information:\n"."Your Username/Login is: " .$Login ."\n"."Your Password is: " .$password . "\n" ."\n";
$message = "";
$from =admin@localhost.com";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain";
ini_set("SMTP", "admin@localhost.com");
mail ($to, $subject, $message, additional_headers);
ini_restore("SMTP");
View profile  Send private message
Martin K.
Posted: 12/10/2004, 1:45 AM

global $Request;
$db = new clsDBlocalhost();
$to = $Request->email->GetValue();
$UserName=CCDLookUp("username", "users","email = ".CCToSql($to,ccsText),$db);
$Password=CCDLookUp("password", "users", "email = ".CCToSql($to,ccsText),$db);
$subject = "Re: Forgotten Username/Password";
$message = "You requested your login information:\n".
"Your Username/Login is: " .$Login ."\n".
"Your Password is: " .$password . "\n" ."\n";
$from =admin@localhost.com";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain";
ini_set("SMTP", "admin@localhost.com");
mail ($to, $subject, $message, additional_headers);
ini_restore("SMTP");
Martin K
Posted: 12/10/2004, 1:53 AM

Quote Martin K.:
global $Request;
$db = new clsDBlocalhost();
$to = $Request->email->GetValue();
$UserName=CCDLookUp("username", "users","email = ".CCToSql($to,ccsText)."",$db);
$Password=CCDLookUp("password", "users", "email = ".CCToSql($to,ccsText)."",$db);
$subject = "Re: Forgotten Username/Password";
$message = "You requested your login information:\n".
"Your Username/Login is: " .$Login ."\n".
"Your Password is: " .$password . "\n" ."\n";
$from =admin@localhost.com";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain";
ini_set("SMTP", "admin@localhost.com");
mail ($to, $subject, $message, additional_headers);
ini_restore("SMTP");
dynamiconcepts

Posts: 17
Posted: 12/10/2004, 1:58 AM

thanks man I am half way there but for some reason i get this error
Parse error: parse error, unexpected '@' in
View profile  Send private message
dynamiconcepts

Posts: 17
Posted: 12/10/2004, 2:01 AM

Got it i see what was wrong forgot "
View profile  Send private message
Martin K
Posted: 12/10/2004, 2:02 AM

$from =admin@localhost.com";

$from ="admin@localhost.com";

Martin

dynamiconcepts

Posts: 17
Posted: 12/10/2004, 2:05 AM

Thanks for all your help

can i send a test e-mail from localhost ?
View profile  Send private message
Martin K
Posted: 12/10/2004, 2:18 AM

Hello.
If you change you server local to send mails, it must go.
But most Apacheserver local donīt send Email.
Sorry about my english
martin

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright Đ 2003-2004 by UltraApps.com  and YesSoftware, Inc.