redirecting to a success page

From: Date: Mon, 22 Nov 2004 14:13:13 +0000
Subject: redirecting to a success page
Groups: php.general 
Request: Send a blank email to php-general+get-202669@lists.php.net to get a copy of this message
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@seitervaughn.com | jud@bizville.com 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"; ===================================================

« previous php.general (#202669) next »