www.webdeveloper.com
Results 1 to 2 of 2

Thread: Parse error: syntax error, unexpected $end in

  1. #1
    Join Date
    Nov 2004
    Location
    England Sunderland
    Posts
    102

    Parse error: syntax error, unexpected $end in

    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

    PHP Code:
    <? 
    $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.");
    };

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    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)
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles