The links in the dynamic table on the master page (see Creating the links to the detail page (PHP)) not only have to open the detail page, they must pass the ID of the record the user selected. The detail page will use this ID to find the requested record in the database and display it.
The record ID is passed to the detail page in a URL parameter.
This section describes how to create a URL parameter that passes a record ID to the detail page.
To create the URL parameter:
1. Select the link in the dynamic table.
If Live Data is turned on, select the link in the first row.
2. In the Link field in the Property inspector, add the following string at the end of the URL: ?recordID=
The question mark tells the server that what follows is one or more URL parameters. The word recordID is the name of the URL parameter (you can use any name you like). Make a note of the name of the URL parameter because you’ll use it in the detail page later.
The expression after the equal sign is the value of the parameter. In this case, the value is generated by a PHP expression that returns a record ID from the recordset. A different ID is generated for each row in the dynamic table. In the PHP expression, replace recordsetName with the name of your recordset, and replace fieldName with the name of the field in your recordset that uniquely identifies each record. In most cases, the field will consist of a record ID number. In the following example, the field consists of unique location codes.
locationDetail.php?recordID=
When the page runs, the values of the recordset’s CODE field are inserted in the corresponding rows in the dynamic table. For example, if the Canberra, Australia, rental location has the code CBR, then the following URL will be used in the Canberra row in the dynamic table:
locationDetail.php?recordID=CBR
3. Save the page.
Tuesday, September 30, 2008
Creating a URL parameter for the links (PHP)
Subscribe to:
Post Comments
(
Atom
)
About Me
- Rakesh Sharma
-
Web Designer | Blogger | Web Addict
Follow on Google+
Recommend on Google +1
RSS Feed
Subscribe Recent Posts
Popular Posts
-
If you are looking 'how to put a any form in a blogger' then this post is going to help you. Putting a form in blogger is very easy....
-
If you are looking for free e-books for Web Design and Development then this post is for you. Here I have shared some very useful e-books wi...
-
When you write a CSS for your project you never know what kind of bug or issue you will face at time of browser compatibility. Internet Ex...
-
Cooliris is simply the fastest and most stunning way to browse photos and videos from the Web or your desktop for free. Effortlessly scroll...
-
Now a days every one intend to aware about HTML5 more and more. According to experts HTML5 is a future of the web. There are some interestin...
-
jQM (jQuery Mobile) becoming very popular now a days. Mobile developers from across the world contributing their knowledge to make it more u...
-
In web development scripts like jQuery and Ajax becomes very handy for web developers. If you are a learner or a expert these scripts is rea...
-
In this post I'm sharing a list of XML based CMS (Content Management System) to help web designers and developers. CMS usually implement...
-
Today I would like to share that how to add a Facebook fan list to your blog or website (like I have added here at right sidebar). This is t...
-
Today I am really happy to anounce that I have launched new social book marking site called ' TutLinks '. This is a first networkin...
0 comments :
Post a Comment