By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Parse error: parse error, unexpected $end

100+
P: 127
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\Apache2\htdocs\jobsearch_result.php 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($_GET['id']);

//connect to server and select database

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



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

$rows=mysql_fetch_array($sql);





?>

<div align='center'><font face='Verdana' size='3'><strong><? echo $rows['companyName'];?></strong></font></div>
<?
while($rows=mysql_fetch_array($sql)){
?>
[/PHP]
[HTML]
<form action=jobsearch_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>Contact 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]
Mar 2 '07 #1
Share this Question
Share on Google+
3 Replies


ronverdonk
Expert 2.5K+
P: 4,258
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:
Mar 2 '07 #2

100+
P: 127
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.. :)
Mar 2 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
You are welcome.

Ronald :cool:
Mar 2 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.