apache 2.0.55 / PHP 5.1.1 - error in variables
Hello,
Pls help me resolve this.
PHP Notice: Undefined index: addMember in C:\...
I have the following code. Don't know why it is failing with the error message:
<?php
include("ConnectionManager.php");
$PHP_SELF = "AddMember.php";
$success_flag = "";
$duplicate_flag = "false";
$addMember = $_POST['addMember'];
if ($addMember != "")
{
$dbconn = new ConnectionManager();
$thisconn = $dbconn->Connect();
?>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="expired" CONTENT="01-Mar-94 00:00:01 GMT">
<LINK rel="STYLESHEET" type="text/css">
</head>
<body bgcolor="#ffffff" text="#330099" onLoad="javascript:document.forms[0].primaryEmail.focus();return;">
<script type="text/javascript" LANGUAGE="JavaScript1.2"></script>
<b>
<a href='/admin'>Administration</A> >>
<a href='#'>Add New Member</A></b>
<BR><BR><BR><BR>
<B><center>
<?php
if ($success_flag == "true")
{
echo("Member added successfully.");
}
else
if ($success_flag == "false")
{
if($duplicate_flag == "true")
{
echo("Member already exists.");
}
else
{
echo("<BR>There were errors encountered while adding members. Please try again.");
echo("<script type='text/javascript' LANGUAGE='JavaScript1.2'></script>");
exit;
}
}
?>
</center></B>
<center>
<FORM action="<?php echo($PHP_SELF) ?>" method="POST">
<table>
<tr>
<td align=right>Last Name</td>
<td>
<INPUT TYPE=TEXT NAME='lastName' value='' size='50' maxlength='60'>
</td>
</tr>
<tr>
<td align=right>Phone Number</td>
<td>
<INPUT TYPE=TEXT NAME='phoneNumber' value='' size='50' maxlength='20'>
</td>
</tr>
<tr>
<td align=right>Country Code</td>
<td>
<INPUT TYPE=TEXT NAME='countryCode' value='' size='10' maxlength='3'>
</td>
</tr>
<tr>
<td> </td>
<td>
<INPUT TYPE='submit' NAME='addMember' VALUE='Add Member'>
</td>
</tr>
</table>
</FORM>
</center>
Pls help ..
Thanks once again.
|