Click to See Complete Forum and Search --> : Parse error: syntax error, unexpected $end in


bazjones
01-13-2005, 04:01 AM
Hi ppl

Any ideas why i am getting the below error when i run the following php script??

Parse error: syntax error, unexpected $end in


<?
$numChecked = 0;
?>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="StatusForm">
<strong>FILTER :</strong> <strong>Raised:
<input name="status[]" type="checkbox" value="Raised" <?php
$checked = @array_search("Raised",$statusselect);
if(is_int($checked)){
echo "checked";
$numChecked++;
?>>
In progress:
<input name="status[]" type="checkbox" value="In progress" <?php
$checked = @array_search("In progress",$statusselect);
if(is_int($checked)){
echo "checked";
$numChecked++;
?>>
Completed:
<input name="status[]" type="checkbox" value="Completed" <?php
$checked = @array_search("Completed",$statusselect);
if(is_int($checked)){
echo "checked";
$numChecked++;
?>>
On Hold:
<input name="status[]" type="checkbox" value="On Hold" <?php
$checked = @array_search("On Hold",$statusselect);
if(is_int($checked)){
echo "checked";
$numChecked++;
?>>
Rejected:
<input name="status[]" type="checkbox" value="Rejected" <?php
$checked = @array_search("Rejected",$statusselect);
if(is_int($checked)){
echo "checked";
$numChecked++;
?>>
</strong>
<input type="submit" name="Submit" value="Go">
</form>
if($numChecked == 0){
echo("please select at least one option.");
}else{
echo("THANKS FOR YOUR TIME AND EFFORT.");
};

scragar
01-13-2005, 07:17 AM
be sure your not opening PHP when you've failed to close it or visaversa, I think the code is missing a starting PHP tag at the bottom as you've got PHP that's not highlighted.

A good tip is to always copy and paste your code into the forum under PHP tags and check the preview(nice color highlighting)