Re: redirecting to a success page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can send a header to redirect like below.
<?php

header("location: successpage.php");
?>

Or you can print out some javascript
location.href='successpage.php';



-randy rinehart


----- Original Message ----- 
From: "Judson Vaughn" <jud@xxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Monday, November 22, 2004 8:13 AM
Subject:  redirecting to a success page


> Group,
>
> I have a create_login.php page, which works (it inserts data into the
> database), but I need for the script once executed to redirect to a
> success.php page.
>
> It doesn't do this and I can't figure out how to do it. I've included a
> portion of the script below. This was created by Dreamweaver MX and
> modified by me.
>
> The original script, created by Dreamweaver, gives an error that says
> header has already been sent. I tried different options to no avail. I
> realize this script is now seriously hosed but thought I would include
> it anyway since others may be using Dreamweaver.
>
> Anybody know a simple fix for this? I have a feeling that it's right in
> front of me but I'm just not getting it.
>
> Jud.
>
> Judson Vaughn
> jud@xxxxxxxxxxxxxxxx | jud@xxxxxxxxxxxx
> Seiter Vaughn  Communications
> 12455 Plowman Court
> Herndon, VA 20170
> 703.450.9740
> svc
>
> ===================================================
>
> $editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
> if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
>    $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];
> }
>
> if ((isset($HTTP_POST_VARS["MM_insert"])) &&
> ($HTTP_POST_VARS["MM_insert"] == "form1")) {
>    $insertSQL = sprintf("INSERT INTO xcart_customers (login, usertype,
> membership, password, firstname, lastname, email, pending_membership)
> VALUES ( %s ,%s, %s, %s, %s, %s, %s, %s)",
>                         GetSQLValueString($HTTP_POST_VARS['login'],
"text"),
>                         GetSQLValueString($HTTP_POST_VARS['usertype'],
> "text"),
>                         GetSQLValueString($HTTP_POST_VARS['membership'],
> "text"),
>                         GetSQLValueString($HTTP_POST_VARS['password'],
> "text"),
>    GetSQLValueString($HTTP_POST_VARS['firstname'], "text"),
>    GetSQLValueString($HTTP_POST_VARS['lastname'], "text"),
>    GetSQLValueString($HTTP_POST_VARS['email'], "text"),
>
> GetSQLValueString($HTTP_POST_VARS['pending_membership'], "text"));
>
>    mysql_select_db($database_courses1, $courses1);
>    $Result1 = mysql_query($insertSQL, $courses1) or die(mysql_error());
>
>
>    $insertGoTo = "success.php";
>
> ===================================================
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux