Page 1 of 1

Undefined index...!!!!!!!!!!!!!

Posted: Tue Dec 27, 2005 9:16 am
by bubberz
I've got a page a user sees if they're a new user. They enter an email and password.

If the "Check New Username" behavior allows the entry to continue, the new user will enter more information about themselves.

I'm trying to use the Email and password for the first two text fields in the next form via Bindings / Form Variable, but get the following for both these fields:

Undefined index: Email in <b>C:\htdocs\NewSubInfo.php

The HTML is:

value="<?php echo $_POST['Email']; ?>"

This should be pretty simple, but I'm not too sure what I'm doing wrong.

I've checked to make sure the spelling is correct.

For the button click on the first page, here's the code that's called to decide which page to go to next:

Code: Select all

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO main (Email, Password) VALUES (%s, %s)",
                       GetSQLValueString($_POST['Email'], "text"),
                       GetSQLValueString($_POST['password'], "text"));

  mysql_select_db($database_connLE, $connLE);
  $Result1 = mysql_query($insertSQL, $connLE) or die(mysql_error());

  $insertGoTo = "NewSubInfo.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
*******************

What's odd is if I take the <?php echo $editFormAction; ?> action out of the form and put in NewSubInfo.php (keep the method to Post), the two fields on the next page are in fact populated w/o errors. A a var_dump($_POST) gives me an array(0).

d11wtq | Please use

Code: Select all

 tags around your PHP code[/color]

Posted: Tue Dec 27, 2005 9:25 am
by Chris Corbyn
Moved to PHP Code

Posted: Tue Dec 27, 2005 9:25 am
by foobar
Use [ php ] tags around your code. Another tihng: Cross-post?

Posted: Tue Dec 27, 2005 10:39 am
by bubberz
Sorry...newbie screwup!

My bad!

Posted: Tue Dec 27, 2005 10:41 am
by m3mn0n
Please do not cross-post.

viewtopic.php?t=42274

Topic locked.