Jump to content

Parse error: parse error, unexpected $end in c:\program files\easyphp1-7\www\emp


rameshfaj

Recommended Posts

what is problem with the code?Can anyone patiently suggest the mistake?Any suggestion or correction to the code are appreciated.Below is the code:

 

<?php 		


				include("../functions/functions.php");
				include("../package/session.php");
				include("../functions/database_functions.php");
				//include("../functions/emp_functions.php");
				check_session();

					connectdb();

					$result = mysql_query("SELECT categoryname FROM category");
					if (!$result) 
					{
					   die('<div class=error> ERROR <br>'.mysql_error().'</div>');
					}

			$user=@$_SESSION['user'];//give the username from the session
			$type=@$_SESSION['usertype'];

			$SID=session_id();
			$logo="../employer/logo/$user.jpg";//get the logo of the employer from logo folder under employer

			$formpage="";
			$all_ok=0;
			$form_val=0;

			$all_error="";
			$categoryerr="";
			$titleerr="";
			$descriptionerr="";
			$openingserr="";
			$skillserr="";
			$qualificationerr="";
			$responsibilityerr="";
			$experienceerr="";
			$deadlineerr="";
			$locationerr="";
			$salaryerr="";
			$gendererr="";
			$deadlineerr="";
			$ageerr="";
			$ownershiperr="";
			$maritalerr="";
			$serviceerr="";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>JobsPokhara.com.no problem [ Search Smart Jobs in Pokhara ]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="abstract" content="First Job Site of Pokhara">
<meta name="Description" content="This is the first jobsite of Pokhara city, Nepal.">
<meta name="keywords" content="jobs, pokhara, jobspokhara, pokharajobs, work, work in pokhara, pokhara work, jobs in pokhara, smart jobs in pokhara, smart jobs, good jobs, better work in pokhara, nepal, jobsnepal, nepaljobs, work in nepal, jobsite, jobsite of pokhara, job placement, vacancy, vacancy in pokhara">
<meta name="revisit-after" content="7 ">
<!-- 
<meta name="robots" content="index,follow"> 
<meta HTTP-EQUIV="Refresh" content="0; url=../index.php">
-->

<link href=.././css/menu.css type=text/css rel=stylesheet>
<link href=.././css/default.css type=text/css rel=stylesheet>
<link href=.././css/error.css type=text/css rel=stylesheet>
<link href=.././css/form_css.css type=text/css rel=stylesheet>
</head>
<body><table width=100% border=0>
  
		  <tr>
				<td><div align=center><?php include("../package/header.php"); ?></div></td>
			</tr>
	</table>
	<table width=100% border=0>
		  <tr>
			<td><div align=center>
					<?php include("../package/main_menu.php");?>
				</td></tr>
		</table>


<table width="100%" border="0">
  <tr>
    <td align="center" valign="top"><table width="100%"  border="0">
      <tr>
        <td width="21%"><table width="100%"  border="0">
          <tr>
			<td><div align="center"></div></td>
          </tr>
         </td>
        </tr>
          
          <tr>
            <td align="center" valign="top"><div align="center">
              <?php include("../package/left_emp_menu.php");?>
            </div></td>
          </tr>
          
          
          <tr>
            <td><div align="center"></div></td>
          </tr>
          <tr>
            <td align="center" valign="top"><div align="center">
              <?php //include("../forms/signup_form.php"); 
              ?>
			</div>
            </td>
          </tr>
          
          
          <tr>
            <td> </td>
          </tr>
          
          <tr>
            <td align="center" valign="top"><div align="center">
              <?php include("../forms/tell_a_friend.php");?>
            </div>
            </td>
          </tr>
          
          <tr>
            <td> </td>
          </tr>


	<tr>
		<td width="67%" align="center" valign="top"><table width="100%"  border="0">
			<tr>
				<td><div align="center"></div></td>
			</tr>
		</td>
	</tr>	
            
            <tr>
			<td><div align="center">

							<?php
								if($all_ok==1)
								{
										echo '
								  <h4 align=center>[ New Job Post ]</h4>
									<table width=100%  border=0 cellspacing=0 cellpadding=5>
										<tr>
											<td width=100% class=success><div align=center>Successfully Job Posted.</div>
											</td>
										</tr>
									</table></div></td>';
									}
									else
									{ 
										echo "$formpage</td>";
									}				
					?>		
		</tr>
 </table>
       

<?php

				if(isset($_POST['submit']))
				{
						$category=@$_POST['category'];
						$title=@$_POST['title'];
						$description=@$_POST['description'];
						$openings=@$_POST['openings'];
						$skills=@$_POST['skills'];
						$responsibility=@$_POST['responsibility'];
						$deadline=@$_POST['deadline'];
						$location=@$_POST['location'];
						$salary=@$_POST['salary'];
						$sex=@$_POST['sex'];
						$age=@$_POST['age'];
						$qualification=@$_POST['qualification'];
						$experience=@$_POST['experience'];
						$ownership=@$_POST['ownership'];
						$service_type=@$_POST['service_type'];
						$maritalstatus=@$_POST['maritalstatus'];

						if(($category==null)&&($title==null)&&($description==null)&&($openings==null)&&($skills==null)&&($responsibility==null)&&($deadline==null)&&($location==null)&&($salary==null)&&($maritalstatus==null)&&($sex==null)&&($age==null)&&($qualification==null)&&($experience==null)&&($ownership==null)&&($service_type==null))
							{
								$all_error="Blank data submission is not allowed.";
								echo "all field blank.";
							}
								else
								{
									if($category=="")
										$categoryerr="Category is required.";

									if($title=="")
										$titleerr="Title is required.";

									if($description=="")
										$descriptionerr="Description is required.";

									if($openings=="")
										$openingserr="Openings number is required.";

									if($skills=="")
										$skillserr="Skills is required.";

									if($responsibility=="")
										$responsibilityerr="Responsibility is required.";

									if($deadline=="")
										$deadlineerr="Deadline is required.";

									if($location=="")
										$locationerr="Location is required.";

									if($salary=="")
										$salaryerr="Salary cannot be empty.";		


							}

					if(($category!=null)&&($title!=null)&&($description!=null)&&($openings!=null)&&($skills!=null)&&($responsibility!=null)&&($deadline!=null)&&($location!=null)&&($salary!=null))
					{
						$sql="INSERT INTO `jobpost` ( `eid` , `categoryname`,`companyname` , `title` , `description`,`openings`,`sex`,`age`,`qualification`,`experience`,`skills`,`responsibility`,`ownership`,`postdate`,`deadline`,`location`,`salary`,`service_type`,`maritalstatus`,`logo`) VALUES ('".$employerid
						."' ,'".$categoryname."', '".$companyname
						."' , '".$title
						."' , '".$description."' ,
						'".$openings."',
						 '".$sex."' ,
						  '".$age."' ,
						   '".$qualification."' ,'".$experience."','".$skills."','".$responsibility."','".$ownership."','".$postdate."','".$deadline."','".$location."','".$salary."','".$service_type."','".$maritalstatus."','$logo') ";
					$result=mysql_query($sql);

									if(!$result)
									{
										echo '<div class="error">ERROR, while adding new JOB.<br>'.mysql_error().'</div>';
									}
									else{
										$all_ok=1;
									}

					}



$formpage=<<<EOFORMPAGE
			<div id=sidebar> <div class=calloutbox style=width: 100%;>
						<h4 align=center>[ New Job Post ]</h4>
				<form name=add_resume method=post action=post_new.php?type=$type&SID=$SID&user=$user 								enctype=multipart/form-data>	
			<table width=100%  border=0 cellspacing=0 cellpadding=5>
				<tr>
					<td></td><td class="error">$all_error</td><td></td></tr>
                  <tr>
                    <td width=31% class=form_characters><div align=center><span class=star>* </span>Category 		: 											</div></td>
						<td width=29%><select name='category' size=1 class=form_field>
EOFORMPAGE;						$sql="select categoryname from category";	
								$result=mysql_query($sql);

							while($row = mysql_fetch_row($result)){
							$formpage .="<option></option>";
							$formpage .="<option value=$row[0]>$row[0]</option>";
							}
		$formpage .="</select></td>
					<td width=40% class=form_error>$categoryerr</td>
                  </tr>
                  
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Job Title: </div></td>
                    <td><input type=text size=30 name='title' class=form_field></td>
                    <td class=form_error>$titleerr</td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Description:</div></td>
                    <td><label>
                      <textarea name='description' cols=30 rows=5 class=form_field></textarea>
                    </label></td>
                    <td class=form_error>$descriptionerr</td>
                  </tr>
                  
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Openings: </div></td>
                    <td><input name='openings' type=text size=30 maxlength=2 class=form_field></td>
                    <td class=form_error>$openingserr</td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Gender: </div></td>
                    <td><select name='sex' class=form_field>
				   <option value='Male'>Male</option>
                      <option value='Female'>Female</option>
                      <option value='Both'>Both</option>
                    </select></td>
                    <td class=form_error></td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Age: </div></td>
                    <td><select name='age' class=form_field>
				   <option value='16-20'>16-20</option>
                      <option value='21-30'>21-30</option>
                      <option value='31-40'>31-40</option>
                      <option value='Above 40'>Above 41</option>
                      <option value='ANY'>ANY</option>
                    </select></td>
                       </tr>
                  <tr>
                    
                    <td class=form_characters><div align=center><span class=star>* </span>Qualification:</div></td>
                    <td><select name=qualification class=form_field>
				<option></option>
                      <option value=Secondary>Secondary</option>
                      <option value=Intermediate>Intermediate</option>
                      <option value=Bachelors>Bachelors</option>
                      <option value=Masters>Masters</option>
                      <option value=PhD>PhD</option>
                      <option value=ANY>ANY</option>
                    </select></td>
                           </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Experiences:</div></td>
                    <td><select name='experience' class=form_field>
				  <option value='1'>1 year</option>
                      <option value='1-2'>1-2 years</option>
                      <option value='2-3'>2-3 years</option>
                      <option value='3-4'>3-4 years</option>
                      <option value='4-5'>4-5 years</option>
                      <option value='NONE'>NONE</option>
                    </select></td>
                    </tr>
                  
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Skills: </div></td>
                    <td><label>
                      <textarea name='skills' cols='30' rows='5' class=form_field></textarea>
                    </label></td>
                    <td class=form_error>$skillserr</td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Responsibility: </div></td>
                    <td><label>
                      <textarea name='responsibility' cols='30' rows='5' class=form_field></textarea>
                    </label></td>
                    <td class=form_error>$responsibilityerr</td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Deadline: </div></td>
                    <td><input type='text' size=30 name='deadline' class=form_field></td>
                    <td class=form_error>$deadlineerr</td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Ownership</div></td>
                    <td><select name='ownership' class=form_field>
				  <option value=Private>Private</option>
                      <option value=Government>Government</option>
                      <option value=Community>Community</option>
                      <option value=NGO>NGO</option>
                      <option value=INGO>INGO</option>
                      <option value=OTHER>Other</option>
                    </select></td>
                    <td class=form_error></td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Location: </div></td>
                    <td><input type=text name='location' size=30 class=form_field></td>
                    <td class=form_error>$locationerr</td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Salary: </div></td>
                    <td><input type=text name='salary' size=30 class=form_field></td>
                    <td class=form_error>$salaryerr</td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Service Type: </div></td>
                    <td><select name='service_type' class=form_field>
				   <option value=FULL TIME>Full Time</option>
                      <option value=PART TIME>Part Time</option>
                      <option value=CONTRACT>Contract</option>
                      <option value=OTHERS>Others</option>
                    </select></td>
                    
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Marital Status: </div></td>
                    <td><select name='maritalstatus' class=form_field>
				   <option value=SINGLE>Single</option>
                      <option value=COUPLE>Couple</option>
                      <option value=DIVORCED>Divorced</option>
                      <option value=OTHERS>Others</option>
                    </select></td>
                       </tr>
                  <tr>
                    <td> </td>
                    <td><input type=submit name='submit' value='Post Job' class='form_field'</td>
                    <td> </td>
                  </tr>                  
                </table>
		</form>  

  
  </div>";
}


else
{
					if($form_val!=1)
					{
					$formpage=<<<EOFORMPAGE
								<div id=sidebar> <div class=calloutbox style=width: 100%;>
						  <h4 align=center>[ New Job Post ]</h4>
						<form name=add_resume method=post action=post_new.php enctype=multipart/form-data>	
								<table width=100%  border=0 cellspacing=0 cellpadding=5>
								  <tr><td width=31% class=form_characters><div align=center><span class=star>* </span>Category : </div></td><td width=29%><select name=category size=1 class=form_field>
EOFORMPAGE;							
							$sql="select categoryname from category";
							while($row = mysql_fetch_row($result))
							{
								//$formpage .="<option></option>";
								$formpage .="<option value=$row[0]>$row[0]</option>";
							}
		$formpage .="</select></td>
                    
                    <td width=40%> </td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Job Title: </div></td>
                    <td><input type=text size=30 name='title' class=form_field></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Description:</div></td>
                    <td><label>
                      <textarea name='description' cols=30 rows=5 class=form_field></textarea>
                    </label></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Openings: </div></td>
                    <td><input name='openings' type=text size=30 maxlength=2 class=form_field></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Gender: </div></td>
                    <td><select name='sex' class=form_field>
				   <option value='Male'</option>
                      <option value='Female'>Female</option>
                      <option value='Both'>Both</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Age: </div></td>
                    <td><select name='age' class=form_field>
				   <option value='16-20'>16-20</option>
                      <option value='21-30'>21-30</option>
                      <option value='31-40'>31-40</option>
                      <option value='Above 40'>Above 41</option>
                      <option value='ANY'>ANY</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Qualification:</div></td>
                    <td><select name='qualification' class=form_field>
				   <option value='Secondary'>Secondary</option>
                      <option value='Intermediate'>Intermediate</option>
                      <option value='Bachelors'>Bachelors</option>
                      <option value='Masters'>Masters</option>
                      <option value='PhD'>PhD</option>
                      <option value='ANY'>ANY</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Experiences:</div></td>
                    <td><select name='experience' class=form_field>
				     <option value=1>1 year</option>
                      <option value='1-2'>1-2 years</option>
                      <option value='2-3'>2-3 years</option>
                      <option value='3-4'>3-4 years</option>
                      <option value='4-5'>4-5 years</option>
                      <option value='NONE'>NONE</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Skills: </div></td>
                    <td><label>
                      <textarea name='skills' cols=30 rows=5 class=form_field></textarea>
                    </label></td>
                    <td> </td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Responsibility: </div></td>
                    <td><label>
                      <textarea name='responsibility' cols=30 rows=5 class=form_field></textarea>
                    </label></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Deadline: </div></td>
                    <td><input type=text size=30 name='deadline' class=form_field></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Ownership</div></td>
                    <td><select name='ownership' class=form_field>
				   <option value='Private'>Private</option>
                      <option value='Government'>Government</option>
                      <option value='Community'>Community</option>
                      <option value='NGO'>NGO</option>
                      <option value='INGO'>INGO</option>
                      <option value='OTHER'>Other</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Location: </div></td>
                    <td><input type=text name='location' size=30 class=form_field></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Salary: </div></td>
                    <td><input type=text name='salary' size=30 class=form_field></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Service Type: </div></td>
                    <td><select name='service_type' class=form_field>
				    <option value='FULL TIME'>Full Time</option>
                      <option value='PART TIME'>Part Time</option>
                      <option value='CONTRACT'>Contract</option>
                      <option value='OTHERS'>Others</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td class=form_characters><div align=center><span class=star>* </span>Marital Status: </div></td>
                    <td><select name='maritalstatus' class=form_field>
				   <option value='SINGLE'>Single</option>
                      <option value='COUPLE'>Couple</option>
                      <option value='DIVORCED'>Divorced</option>
                      <option value='OTHERS'>Others</option>
                    </select></td>
                    <td> </td>
                  </tr>
                  <tr>
                    <td> </td>
                    <td><input type=submit name='submit' value='Post Job' class='form_field'></td>
                    <td> </td>
                  </tr>                  
                </table>
</form>  
  </div></div>";
}
}
//echo"$formpage";
?>
<td width="12%" align="center" valign="top">Google Ads </td>
      </tr>
    </table>      </td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td><div align="center">
      <p>Google Ads</p>
      <p> </p>
      <p> </p>
    </div></td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td><div align="center"><?php include("../package/footer.php");
    ?>
    </div></td>
  </tr>
</table></body>
</html>

 

(edited by kenrbnsn to put in the


tags)

Link to comment
Share on other sites

OMG use the code tags.... no one can read this... how do you expect to be helped if people can't read your code!!!

 

Anyway with a quick look i saw you use heredocs. These might be your problem's cause...

 

Heredocs have very strict syntax and cause parse errors if you dont follow it... If i were you i would check for extra chars after the heredoc closing statement... this line must have only that statement!

 

put the code in code tags please!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.