i really appreiciate your help, its nice to know that there are people like you out there
Im getting errors, actually a blank page the whole code i have for the page is:
$db_name = "";
$table_name = "jobs";
$connection =
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
if (!($_GET['limit'])){
$limit = 500;} // Default results per-page.
if (!($_GET['page'])){
$page = 0;} // Default page value.
// select query
$select_clause = "select * from $table_name";
$where_and = " WHERE ";
$where_clause = "";
//these are constraint checking
if ($POST[keyword] )
{
$where_clause = $where_clause . $where_and ."job_title OR job_summary LIKE '%". '$POST[keyword]' ."%";
$where_and = " AND ";
}
if ($POST[job_sector] )
{
$where_clause = $where_clause . $where_and ."job_sector=".$POST[job_sector];
$where_and = " AND ";
}
if ($POST[job_region )
{
$where_clause = $where_clause . $where_and ."job_region=".$POST[job_region];
$where_and = " AND ";
}
$stmt = $select_clause.$where_clause;
$numresults = mysql_query($stmt); // the query.
$numrows = mysql_num_rows($numresults); // Number of rows returned from above query.
$pages = intval($numrows/$limit); // Number of results pages.
// $pages now contains int of pages, unless there is a remainder from division.
if ($numrows % $limit) {
$pages++;} // has remainder so add one page
$current = ($page/$limit) + 1; // Current page number.
if (($pages < 1) || ($pages == 0)) {
$total = 1;} // If $pages is less than one or equal to 0, total pages is 1.
else {
$total = $pages;} // Else total pages is $pages value.
$first = $page + 1; // The first result.
if (!((($page + $limit) / $limit) >= $pages) && $pages != 1) {
$last = $page + $limit;} //If not last results page, last result equals $page plus $limit.
else{
$last = $numrows;} // If last results page, last result equals total number of results.
$job_id = $_GET['job_id'];
while ($row = mysql_fetch_array($result))
{
$job_id = $row['job_id'];
$contact_name = stripslashes($row['contact_name']);
$contact_phone = $row['contact_phone'];
$date_posted = $row['date_posted'];
$job_title = stripslashes($row['job_title']);
$job_summary = stripslashes($row['job_summary']);
$short_summary = substr($job_summary,0,150);
$location = stripslashes($row['location']);
$job_status = stripslashes($row['job_status']);
$salary = $row['salary'];
$career_level = stripslashes($row['career_level']);
$display_block .= "
<table width=75% height=35 cellpadding=0 cellspacing=1>
<tr bgcolor=#FFEBD7>
<td width=54% align=left valign=top><a href=latest_jobs_detail.php?job_id=$job_id>$job_title</a><br>$short_summary.....<a href=latest_jobs_detail.php?job_id=$job_id>[More]</a><br>
<font size=2><strong>Job type:</strong> $job_status<br>
<strong> Salary:</strong>$salary</font>
<td width=15% align=left valign=top>$location
</tr>
</table>";
}
?>
Can you see where im going wrong?