You are here: Re: Log and Error/Info Message class « PHP Programming Language « IT news, forums, messages
Re: Log and Error/Info Message class

Posted by Angelos on 12/15/05 18:25

> Other than that I am not sure what you are looking for, do you want to
> show errors that php generates? Do you want to inform the user if a
> query was successful or not? What are these errors that are being
> generated?
>
What I want is to inform users that
- a query was succesfully competed
- the login details they entered were wrong
- that an image was uploaded succesfully
.....
- And all this usefull messages that a script can generate.

Ofcourse I am able to do that really easy but if I want to redirect at
the same time then I need to store that message somewhere and after the
redirection, display it.
Also I need to display all the messages in a specific div inside my page.
That means that my index.php page has a div like that:
<div id="status">
$log = new $log();
$log->displayStoredMessage();
</div>

And my class that handles the queries look like that:

$result = mysql_query("SELECT * FROM cms_users WHERE cms_user_email =
'".$email."' AND cms_user_passwd = '".$password."'") or die(mysql_error());
$num_rows = mysql_num_rows($result);
....
if($num_rows == 1)
return true;
else
{
$log=new log();
$log->Log('Message','Invalid Login, please make sure you enter your
Email and Password.<br>If you forgot your password, enter your email and
hit the forgot password button.');
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация