Hi

I'm trying to parse a recordID from a table of data in one page and pass data based on the chosen record to another page.
The data is taken from a database and I've used recordsets:
I have one recordset called rs_search which contains data from 2 tables called property_details and address_images, where they are connected by the field prop_id. (The address_images table also has the field images_id.
What I'm trying to do is have the link below take data from a subset of information and then show an extended amount of the same information on another page called propertylisting_details.php

The address_images table contains the images which are to be shown in the propertylisting_details.php page. The rest of the information is taken from the property_details table.

The link below is not picking up any record id from prop_id.

Any help would be much appreciated. Many thanks

propertylisting_details.php?recordID=<?php echo $row_rs_search ['prop_id']; ?>

What exactly is your problem?
Does propertylisting_details.php?recordID=nnn work? (Replace nnn with any valid record number.)
Does $row_rs_search contain a value?
Show the code in propertylisting_details.php where you query the database.

Hi Many thanks for getting back to me so quickly. I really appreciate it.
To answer your questions in order:

Yes - when I put in a valid record number to recordID=nn - yes that works.
$row_rs_search does contain a value, as the prop_id field is automated. No records will be null.

My query on the propertylisting_details.php page is as follows:

mysql_select_db($database_iwalletc_localhost, $iwalletc_localhost);
$query_rs_search = "SELECT * FROM property_details, address_images WHERE address_images.prop_id = property_details.prop_id";
$rs_search = mysql_query($query_rs_search, $iwalletc_localhost) or die(mysql_error());
$row_rs_search = mysql_fetch_assoc($rs_search);
$totalRows_rs_search = mysql_num_rows($rs_search);mysql_select_db($database_iwalletc_localhost, $iwalletc_localhost);
$query_rs_search = "SELECT * FROM property_details, address_images WHERE address_images.prop_id = property_details.prop_id";
$rs_search = mysql_query($query_rs_search, $iwalletc_localhost) or die(mysql_error());
$row_rs_search = mysql_fetch_assoc($rs_search);
$totalRows_rs_search = mysql_num_rows($rs_search);

Apologies, forgot to answer your first question. In my original page I have a search form which brings up a list of properties based on the selected search criteria. In each of the property listings, I have put some text saying >>click here for further details<< - I want to add a link to that text so that when the user clicks on it they are taken to a much expanded description of that particular propoerty. - Currently my link is not bringing up the corresponding record.

If propertylisting_details.php?recordID=nnn works, but your generated links do not, there must be an error in generating them. How does the HTML source code of these links look in the generated page?

Hi. It is working now. I had missed out putting the field in my original query. Many thanks for the help. It is really helpful just to have someone to prompt with the list of things to check through. Many thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.