Parse error: parse error, unexpected $end

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bb nicole
    New Member
    • Jan 2007
    • 127

    #1

    Parse error: parse error, unexpected $end

    Below is the code i create when i click on the job title hyperlink, it will display the job information where call from database.
    But the error message is:
    Parse error: parse error, unexpected $end in C:\Apache2\Apac he2\htdocs\jobs earch_result.ph p on line 103
    where line 103 is nothing, my last line is 101


    [PHP]<?php
    session_start() ;
    ob_start();

    // check if id is passed to this routine
    if (isset($_GET['id'])) {
    // if yes: remove harmful tags and save the passed id in variable $id
    $id = strip_tags($_GE T['id']);

    //connect to server and select database

    $conn=mysql_con nect("localhost ", "root", "") or die (mysql_error()) ;
    mysql_select_db ("ums e-job portal", $conn) or die(mysql_error ());



    // construct SQL statement
    $sql = mysql_query("SE LECT * FROM job WHERE job_ID='$id'");

    $rows=mysql_fet ch_array($sql);





    ?>

    <div align='center'> <font face='Verdana' size='3'><stron g><? echo $rows['companyName'];?></strong></font></div>
    <?
    while($rows=mys ql_fetch_array( $sql)){
    ?>
    [/PHP]
    [HTML]
    <form action=jobsearc h_result.php?id =$id method=POST>
    <table class=PageTable border="0" cellpadding="2" cellspacing="2" width="500" align="center">
    <tr>
    <td class=PageTitle width="233" colspan="2" align="center" ><font size="2" face="Verdana"> Job Information</font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Title</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobTitle'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Type</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobType'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Category</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobCategory'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Position</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobPosition'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Location</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobLocation'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Minimal Requirement</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['mRequirement'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Job Description</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['jobDescription '];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Date Posted</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['datePosted'];?></font></td>
    </tr>
    <tr>
    <td class=PageTitle width="233" colspan="2" align="center" ><font size="2" face="Verdana"> <strong>Conta ct Information</strong></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Contact Name</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['contactName'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> E-mail</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['emailAdd'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Contact Number</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['contactNum'];?></font></td>
    </tr>
    <tr>
    <td class=PageTable width="63" align="right" ><font size="2" face="Verdana"> Contact Address</font></td>
    <td class=PageTable width="170" align="center"> <font size="2" face="Verdana"> <? echo $rows['contactAdd'];?></font></td>
    </tr>
    <tr>
    <td colspan="2" align="right" class=PageTable ><a href="mailto:<? echo $rows['emailAdd']; ?>">
    <input type='submit' name='Apply' value='Apply'></a></td>
    </tr>
    </table>
    </form>[/HTML]
    [PHP]
    <?

    }


    ob_end_flush();
    ?>[/PHP]
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    This error means that you have not properly (either one or combination):

    (a) closed a single or double quoted string
    (b) closed a curly braces {} block
    (c) forgot a semi column

    somewhere in your code.

    Ronald :cool:

    Comment

    • bb nicole
      New Member
      • Jan 2007
      • 127

      #3
      Originally posted by ronverdonk
      This error means that you have not properly (either one or combination):

      (a) closed a single or double quoted string
      (b) closed a curly braces {} block
      (c) forgot a semi column

      somewhere in your code.

      Ronald :cool:
      Thank again, ronald...
      I find where is my problem..
      Thanks.. :)

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        You are welcome.

        Ronald :cool:

        Comment

        Working...