Jump to content


Photo

Simple PHP question.


  • Please log in to reply
3 replies to this topic

#1 andy282uk

andy282uk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 July 2006 - 06:13 PM

hey

im trying to construct php code to work with my online form.  i get this error

Parse error: parse error, unexpected T_BOOLEAN_AND, expecting ',' or ')' on line 2

here is the code.
if (isset($_POST["Submit"] AND $_POST["Submit"]) == "Send")

it should be a simple fix.

many thanks



#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 05 July 2006 - 06:15 PM

You have the parenthesis in the wrong place. Try:
<?php if (isset($_POST["Submit"]) && $_POST["Submit"] == "Send") ?>

Ken

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 05 July 2006 - 06:16 PM

Change it to this:
if (isset($_POST["Submit"]) && $_POST["Submit"] == "Send")
Basically you had the closing ) in the wrong place

Umm, Ken beat me :)

#4 andy282uk

andy282uk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 July 2006 - 06:19 PM

Thanks guys!

Much appreciated.  Cant believe I made that mistake!  :-[




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users