Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 9th, 2005, 12:55 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.







Similar Threads
Thread Thread Starter Forum Replies Last Post
CH2 p54-55 parse error. nodster BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 July 25th, 2007 11:16 AM
Php/Apache blackout PHP How-To 1 August 22nd, 2006 08:16 AM
PHP 5.0 and Apache SeniorNSU BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 January 4th, 2006 10:26 PM
which is best :php with iis or php with apache? fromheavenz Beginning PHP 4 September 7th, 2005 01:47 AM
Need help with Apache and PHP yaluyahee BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 19 August 31st, 2004 02:49 PM





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