Jump to content

Archived

This topic is now archived and is closed to further replies.

andy282uk

Simple PHP question.

Recommended Posts

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.
[code]if (isset($_POST["Submit"] AND $_POST["Submit"]) == "Send")[/code]

it should be a simple fix.

many thanks

Share this post


Link to post
Share on other sites
You have the parenthesis in the wrong place. Try:
[code]<?php if (isset($_POST["Submit"]) && $_POST["Submit"] == "Send") ?>[/code]

Ken

Share this post


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

Umm, Ken beat me :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.