Skip to main content
Inspiring
April 5, 2012
Answered

linking to a detail page help

  • April 5, 2012
  • 1 reply
  • 720 views

done this loads of time but can some just help me

i have a page that show some of the results of a query but need to show this rest with a view details here

looking at it too long i think

mysql_select_db($database_hostprop, $hostprop);

$query_Recordset1 = sprintf("SELECT tk_job_title, tk_job_location, tk_job_salary, LEFT(tk_job_desc,200) as truncated_job_desc FROM think_jobsearch WHERE tk_job_title LIKE %s OR tk_job_location LIKE %s OR tk_job_salary LIKE %s", GetSQLValueString("%" . $var_tk_job_title_Recordset1 . "%","text"),GetSQLValueString("%" . $var_tk_job_location_Recordset1 . "%", "text"),GetSQLValueString("%" . $var_tk_job_salary_Recordset1 . "%", "text"));

$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);

$Recordset1 = mysql_query($query_limit_Recordset1, $hostprop) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

the link is here

<a href="job-description.php?<?php echo $row_Recordset1['tk_job_title']; ?>=">view more</a>

the results page is here

$colname_Recordset1 = "-1";

if (isset($_GET['tk_job_title'])) {

  $colname_Recordset1 = $_GET['tk_job_title'];

}

mysql_select_db($database_hostprop, $hostprop);

$query_Recordset1 = sprintf("SELECT * FROM think_jobsearch WHERE tk_job_title = %s", GetSQLValueString($colname_Recordset1, "text"));

$Recordset1 = mysql_query($query_Recordset1, $hostprop) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

       

tabe below

    <td>Job TItle</td>

            <td><?php echo $row_Recordset1['tk_job_title']; ?></td>

          </tr>

          <tr>

            <td>location</td>

            <td><?php echo $row_Recordset1['tk_job_location']; ?></td>

          </tr>

          <tr>

            <td>salary</td>

            <td><?php echo $row_Recordset1['tk_job_salary']; ?></td>

This topic has been closed for replies.
Correct answer bregent

Get rid of the extra '=' in your anchor tag.

1 reply

Participating Frequently
April 5, 2012

A querystring consists of name/value pairs. You are only including the value in yours. Try

<a href="job-description.php?tk_job_title=<?php echo $row_Recordset1['tk_job_title']; ?>=">view more</a>

Inspiring
April 5, 2012

i tried this before

in the return url result it is showing /job-description.php?tk_job_title=security=

and the page is empty

bregentCorrect answer
Participating Frequently
April 5, 2012

Get rid of the extra '=' in your anchor tag.