Re: REDIRECT
| From: | Martin | Date: | Fri, 11 Aug 2000 10:46:59 +0000 |
| Subject: | Re: REDIRECT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11301@lists.php.net to get a copy of this message | ||
Header("Location:...") does only work, if you are NOT printing anything before
calling it. Otherwise you should use Meta-tags to redirect.
Regards
Martin
Rafa wrote:
> Hi,
>
> I have a problem. I want to redirect after insert data into a BD. I have try
> with Header() but it don't work because the Header is already send.
>
> Someone can help me?
>
> Rafa.
> (Spain)
>
> EXAMPLE:
>
> <?
> include("includes/conexionphp.inc");
>
> if ($nombre <> "")
> {
> $sql = "insert into comentarios_ss (id,nombre,email,comentario) values
> (null,'$nombre','$email','$comentario' )";
>
> mysql_query ($sql)
> or die ("Error en la consulta");
>
> <<<-- here I want to do like in ASP: response.redirect
> thank.html" -->>>
>
> }
> else
> {
> ?>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <style type="text/css">
>
> ...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net