Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 24th, 2007, 04:20 PM
Registered User
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to redirect a web page



I'm new in this forum

I need some help

I' ve created a php page, this have a form with method="post" and I get some error when someone press F5 key

So, I create a new page with the php code needed when submit, then in this page i use header to redirect to the first page, but it doesn't work

Here are the to codes

<FORM ENCTYPE="multipart/form-data" action="Incluir.php" name="FrmCorreos" method="post">
        <table width="77%"border="1" align="center" bgcolor="ffffff">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" style="color:#000000;">
                      <td width="25%"><strong>Contacto</strong></td>
                        <td width="75%" align="left"><input name="TxtContacto" type="text" class="Estilo1" size="50%" maxlength="50"></td>
                        <td width="25%"><strong>Correo Electr&oacute;nico</strong></td>
                        <td align="left"><input name="TxtCorreo" type="text" class="Estilo1" size="80%" maxlength="200"></td>
                        <td width="25%"><strong>Archivo</strong></td>
                        <td align="left"><input name="TxtArchivo" type="file" class="Estilo1" size="80%" maxlength="200"></td>
                        <td width="25%"><strong>Envio</strong></td>
                        <td align="left">
                            Informaci&oacute;n Comercial<input name="TxtEnvioIC" type="checkbox" class="Estilo1">
                            Archivo<input name="TxtEnvioAr" type="checkbox" class="Estilo1">
                          <td width="25%"><strong>Observaciones</strong></td>
                          <td align="left"><textarea name="TxtNota" cols="80%" class="Estilo1"></textarea></td>
                        <td colspan="2" align="right"><input type="submit" name="Accion" value="Agregar"></td>



  include ("./Include/Bases.php");
  require './Include/Configuracion.ini';

    //echo "<PRE> GET :";print_r($_GET);echo "POST :";print_r($_POST);echo "</PRE>";
    $base = new Base($Host,$Usuario,$Clave,$BD);
    if (isset($_POST["Accion"])){
            $Sql= "INSERT INTO TableroCorreos (Contacto,Email,Adjunto,Observaciones,Procesado) Values('$TxtContacto','$TxtCorreo','$DirArchivo',' TxtNota',0)";

    header("");// Here is the error

Everything is right, just the header line is wrong

if someone can help me i'll be so glad.

PD: sorry i not good with English.

Old September 4th, 2007, 02:54 PM
Authorized User
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post

Your missing the keyword location



Similar Threads
Thread Thread Starter Forum Replies Last Post
Page redirect help jroxit Classic ASP Basics 7 August 11th, 2008 11:01 AM
Redirect all pages of my web application Maxxim ASP.NET 1.0 and 1.1 Professional 16 May 23rd, 2007 11:05 AM
redirect to page other than default page sarah lee ASP.NET 1.0 and 1.1 Basics 3 December 15th, 2006 05:45 PM
Redirect to new page without closing current page peter2004 ASP.NET 2.0 Basics 5 June 5th, 2006 08:49 PM
Redirect page Warbird Classic ASP Basics 4 June 20th, 2003 07:51 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.