I have a problem with the extended url here in php. I'm not even sure if it's called extended url. I was wondering if someone can help me since i'm no good with PHP. I have a php page the careers.php it shows the career listing but when I click on Learn more link it goes to http(dot)localhost/houseofpatel/jobs/4/Career-4 but it outputs an "Object not found". Does xampplite have something to do with this? or is it just the codes? I also have the breadcrumb.php in here. Please see code below:
session_start();
include("Breadcrumb.php");
$trail = new Breadcrumb();
$trail->add('Careers', $_SERVER['PHP_SELF'], 1);
$trail -> output();
# REMOVE SPECIAL CHARACTERS
$sPattern = array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/');
$sReplace = array('', '-', '');
mysql_query("SET CHARACTER_SET utf8");
//$query = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted DESC LIMIT 0, 4";
if(!$_GET['jobs']){
$jobsPerPage = 4;
}else{
$jobsPerPage = $_GET['jobs'];
}
if(!$_GET['page']){
$currPage = 1;
$showMoreJobs = true;
}else{
$currPage = $_GET['page'];
$showMoreJobs = false;
}
$offset = ($currPage - 1 )* $jobsPerPage;
$query = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted";
$process = mysql_query($query);
if(@mysql_num_rows($process) > 0){
$totalRows = @mysql_num_rows($process);
$query2 = "SELECT * FROM careers_mst WHERE status = 1 ORDER BY dateposted DESC LIMIT $offset, $jobsPerPage";
$process2 = mysql_query($query2);
if(@mysql_num_rows($process2) > 0){
$pagNav = pageNavigator($totalRows,$jobsPerPage,$currPage,'');
while($row = @mysql_fetch_array($process2)){
$id = $row[0];
$title = stripslashes($row['title']);
$title1 = preg_replace($sPattern, $sReplace, $title);
$description = stripslashes($row['description']);
$description1 = substr($description, 0, 200);
$careers_list .= '
<div class="left" style="width:340px; padding-left:10px;">
<p><span class="blue"><strong>'.$title.'</strong></span></p>
'.$description1.'...
<p><a href="jobs/'.$id.'/'.$title1.'" title="Learn more">[ Learn More ]</a></p>
</div>';
}
/*$careers_list .= '
<div class="left" style="width: 100%; margin-top:15px;">
<p><a href="more-jobs" title="More Job Opennings">MORE JOB OPENNINGS >> </a></p>
<div class="divider left"></div>
</div>';
*/
if($showMoreJobs){
if($totalRows > $jobsPerPage){
$currPage++;
}
$jobNav = "<a href=careers.php?page=$currPage title='More Job Opennings'>MORE JOB OPENNINGS >> </a>";
}else{
$jobNav = "$pagNav";
}
$careers_list .= "<div class='left' style='width: 100%; margin-top:15px;'>
<p>$jobNav</p>
<div class='divider left'></div>
</div>";
}
}