Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Form not processing, help!


Message #1 by Empier4552@a... on Fri, 9 Aug 2002 22:49:18 EDT
Empier4552@a... wrote:

> 
> <?php
> if ($action="order") {
> if ($lvl="1") {
> $price = "300gp";
> }
> else if ($lvl="2") {
> $price = "550gp";
> }
> else if ($lvl="3") {
> $price="800gp";
> }
> 

[snip]

> 
> else if ($action="confirm") {
> 

[snip]


For the if/else comparisons you've got assignment '='. You need to use 
comparison '=='. Like this ...

if ($action == "order") {
    if ($lv1 == "1") {
    } else if ($lv1 == "2") {
    }
} else if ($action == "confirm") {

and so on ...



-- 
Sheila Fenelon
http://www.shefen.com/ ~ CGI and Database Programming
http://www.SpencerBoys.com/ ~ Hosting ~ Programming ~ Design


  Return to Index