And also on the folloving page use echo
htmlspecialchars(stripslashes($_GET['err_value']));
John W. Holmes wrote:
Well, the die() function takes a limited number of parameters, which
as
you
noted is why it doesn't like the assignment of the mysql_error() and
the
header
, October 14, 2002 11:44 PM
To: 'php_gen'
Subject: RE: [PHP] passing mysql_error() out put to a different page?
I think that should work but for some reason nothing is getting
written
into
the session
function new_user() {
$res = mysql_query(INSERT INTO users WHERE uname='$_POST[uname
To: Peter Houchin
Cc: php_gen
Subject: Re: [PHP] passing mysql_error() out put to a different page?
Very interesting question
The only thing I can come up with right now is if you detect an error
(one of the functions returning FALSE,)
you can write the contents of mysql_error
Just wanted to say thanks to both Brad and John for their help i got it
going with the following
function new_user() {
$res = mysql_query(...);
if ($res == FALSE)
{
$error = mysql_error();
$_SESSION['mysqlerror'] = $error;
Header(Location: logerror.php?op=insert_error);
}
Well, the die() function takes a limited number of parameters, which
as
you
noted is why it doesn't like the assignment of the mysql_error() and
the
header
statements both inside the die() function. So, why not something like
this:
$res = mysql_query(.);
if ($res == FALSE) //which
Just wanted to say thanks to both Brad and John for their help i got
it
going with the following
No problem...
function new_user() {
$res = mysql_query(...);
if ($res == FALSE)
{
$error = mysql_error();
$_SESSION['mysqlerror'] = $error;
Header(Location:
howdy,
I have a page that I want to control the errors etc for a site, now what I
want is to perform a query on one page but if there's an error it opens a
different page with the error message on it including the out put from
mysql_error() can this be done?
Cheers
Peter
the only dumb question
Very interesting question
The only thing I can come up with right now is if you detect an error
(one of the functions returning FALSE,)
you can write the contents of mysql_error() to a file log and display that
file on another page? Or pass the output of that (mysql_error()) as an
HTTP/form
11:07 AM
To: Peter Houchin
Cc: php_gen
Subject: Re: [PHP] passing mysql_error() out put to a different page?
Very interesting question
The only thing I can come up with right now is if you detect an error
(one of the functions returning FALSE,)
you can write the contents of mysql_error
Subject: RE: [PHP] passing mysql_error() out put to a different page?
i have tried this .. but am getting errors at the moment .. (the sql
error
is deliberate)
function new_user() {
$res = mysql_query(INSERT INTO users WHERE uname='$_POST[uname]' ,
passwd='$_POST[pass]', firstname='$_POST
() on them
before any function is started.
any idea's?
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 15 October 2002 11:21 AM
To: 'Peter Houchin'; 'Brad Bonkoski'
Cc: 'php_gen'
Subject: RE: [PHP] passing mysql_error() out put to a different page
11 matches
Mail list logo