Re: [PHP] passing mysql_error() out put to a different page?

2002-10-16 Thread Marek Kilimajer
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread John W. Holmes
, 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

Re: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread Brad Bonkoski
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread Peter Houchin
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); }

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread John W. Holmes
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread John W. Holmes
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:

[PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
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

Re: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Brad Bonkoski
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread John W. Holmes
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

RE: [PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin
() 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