Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 24th, 2007, 04:20 PM
Registered User
 
Join Date: Aug 2007
Location: San Rafeael, Heredia, Costa Rica.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to redirect a web page

http://p2p.wrox.com/forum.asp?FORUM_ID=92



Hello

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

UtilitariCorreos.php
<FORM ENCTYPE="multipart/form-data" action="Incluir.php" name="FrmCorreos" method="post">
        <table width="77%"border="1" align="center" bgcolor="ffffff">
            <tr><td>
                <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" style="color:#000000;">
                    <tr>
                      <td width="25%"><strong>Contacto</strong></td>
                        <td width="75%" align="left"><input name="TxtContacto" type="text" class="Estilo1" size="50%" maxlength="50"></td>
                    </tr>
                    <tr>
                        <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>
                    </tr>
                    <tr>
                        <td width="25%"><strong>Archivo</strong></td>
                        <td align="left"><input name="TxtArchivo" type="file" class="Estilo1" size="80%" maxlength="200"></td>
                    </tr>
                    <tr>
                        <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>
                    </tr>
                    <tr>
                          <td width="25%"><strong>Observaciones</strong></td>
                          <td align="left"><textarea name="TxtNota" cols="80%" class="Estilo1"></textarea></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right"><input type="submit" name="Accion" value="Agregar"></td>
                    </tr>
                </table>
            </td></tr>
        </table>

    </FORM>


Incluir.php

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

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

    $base->CerrarDB();
    header("192.168.1.100/UtilitarioCorreos.php");// 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.

Reply With Quote
  #2 (permalink)  
Old September 4th, 2007, 02:54 PM
Authorized User
 
Join Date: Sep 2007
Location: , , .
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

Your missing the keyword location

header('Location: 192.168.1.100/UtilitarioCorreos.php');

http://mynameissteve.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:32 AM.


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