RE: [PHP-DB] Help a rookie with a little code problem?
| From: | Richard Allsebrook | Date: | Wed, 19 Jul 2000 15:17:40 +0000 |
| Subject: | RE: [PHP-DB] Help a rookie with a little code problem? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1284@lists.php.net to get a copy of this message | ||
> header("Location: .$target");
^
Nope, that will break it :-(
header("Location: $target");
or (as originally posted)
header("Location: ".$target);
_____
~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, No3 The Embankment, Leeds, LS1 4BJ
http://www.easysoft.com <http://www.easysoft.com>
The Home of Data Access Middleware
"A computer lets you make more mistakes faster than any invention in human
history-with the possible exceptions of handguns and tequila."
_____
-----Original Message-----
From: codyc@cisco.com [mailto:codyc@cisco.com]
Sent: Wednesday, July 19, 2000 3:10 PM
To: davy@wsep.co.uk
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Help a rookie with a little code problem?
I am not sure if it is the problem, but at line 13 in the header
function, you
should have the quotes be around the whole string, like
this:
header("Location: .$target");
Like I said, I am not sure if that would be the cause of all your
problems, but
worth looking into.
/Cody
davy@wsep.co.uk
davy wrote:
> As a person more used to ASP I'm confused here. I get the error below when
I
> run the code I've shown. If I comment out the lines after closing the db
> connection the code works but obviously I get no redirect. If I leave only
> the re-direct code it works. Combine the two and oops!.....no joy. Any
help
> with this is appreciated as I'm flumoxed.
>
> Thanks in advance
>
> Davy
> --------------------------------------------------------
> Parse error: parse error in C:\Inetpub\wwwroot\PHP_guide\deleteOK.php on
> line 12
>
> 01. <?
> 02. $reviewID=$HTTP_GET_VARS["ID"];
> 03.
> 04. $objConn = @odbc_connect( 'reviews','david','pass') or
> 05. die( "Query failed: error was '$php_errormsg'" );
> 06.
> 07. $sqlText = "DELETE * FROM reviews WHERE pubID= ".$reviewID;
> 08.
> 09. odbc_exec( $objConn, $sqlText );
> 10. odbc_close($objConn)
> 11. // If I comment out the following lines the above code works but no
> redirect
> 12. $target ="editReviews.php?passMonth=".$HTTP_GET_VARS["passMonth"];
> 13. header("Location: ".$target);
> 14. exit;
> 15. ?>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net