php-db | 2001041

[PHP-DB] Passing parameters From: Jim Ray (jaray <email protected>)
Date: 04/04/01

I am passing a button parameter. This sounds simple, but for some reason,
it is not working. Here is a snipet of my code.

echo "<table border='1' align='center'>";
echo " <form action='MemberAction.php' method='post'>";
echo " ";

 echo "<TR>
   <td colspan='2' align='center'>
   <input type='submit' name='btnChoice' Value='Save'>
   <input type='submit' name='btnChoice' Value='Delete'>
   <input type='submit' name='btnChoice' Value='View Members'>
   <input type='submit' name='btnChoice' Value='Main Menu'>
   </td>
    </TR>";

If I click on the Main Menu button. I thought the value should be Main Menu?
What gets passed is "Save". Wierd at best.

if ($btnChoice = 'Save'){
    Do something
}elseif ($btnChoice = 'Delete') {
  header("Location: MemberAdmin.shtml");
 exit;
}

Am I missing something here. I am reading my books on the subject, and all
looks correct.

Thank you again for your help.

Jim Ray

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>