Re: unexpected $ error
| From: | Marek Kilimajer | Date: | Tue, 21 Sep 2004 12:46:02 +0000 |
| Subject: | Re: unexpected $ error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197413@lists.php.net to get a copy of this message | ||
luke@lukem.co.uk wrote:
hi, i get the following error when trying to run this code (see below): Parse error: parse error, unexpected $ in /full path form.php on line 59 // if the submit buttons has been pressed if (isset($_POST['submit]))missing single quote if (isset($_POST['submit'])) // more code
foreach($_POST["markets1"] AS $enterprise);The foreach loop is pointless.
$distribute = $_POST["OKToDistr"]; $market = $_POST["OKToMarket"]; //insert the form information into the database $query = "INSERT INTO inmarsat_comp SET firstname="$firstname", lastname="$lastname";";Unescaped double quotes in double quoted string. Change them to sigle quotes and you are done.