Remonte mieux l'erreur si l'utilisateur SQL existe pas

This commit is contained in:
Alan Garcia 2013-01-31 16:49:16 +00:00
parent 6b8965bc45
commit 4519fccd25
2 changed files with 9 additions and 5 deletions

View File

@ -41,7 +41,7 @@ getFields($fields);
<?php
$r=$mysql->get_user_dblist($id);
if (!$r) {
$error=_("This user doesn't exist");
$error=$err->errstr();
}
if (! empty($error) ) {

View File

@ -34,15 +34,19 @@ $fields = array (
"id" => array ("request", "string", ""),
);
getFields($fields);
$r=$mysql->get_user_dblist($id);
?>
<h3><?php printf(_("MySQL Rights for %s"),$id) ?></h3>
<hr id="topbar"/>
<br />
<?php
if (isset($error) && $error) {
echo "<p class=\"error\">$error</p><p>&nbsp;</p>";
$r=$mysql->get_user_dblist($id);
if (!$r) {
$error=$err->errstr();
}
if (!empty($error)) {
echo "<p class=\"error\">$error</p><p>&nbsp;</p>";
require_once('foot.php');
}
if ($r) {