Current location: Hot Scripts Forums » Programming Languages » PHP » More Details link


More Details link

Reply
  #1 (permalink)  
Old 01-03-04, 04:47 PM
php-learner php-learner is offline
Newbie Coder
 
Join Date: Jan 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy More Details link

Help....

I am new to php programming and i am designing a site whereby users add information of their cars. I have created the add_cars page and i can search for them aswell.

What i need help with is a code whereby i search for the cars but i only want to display say 3 out of the 5 pieces of information. I would like a (more details) link which will open up a link to the information on that car.

I have been doing some research and i have read that there are two files which are needed to be created, one to create the id and the other to display the results. I dont really understand this. Has anyone created any code or know of a well explained tutorial where i can learn how to do this.

THANKYOU
Reply With Quote
  #2 (permalink)  
Old 01-03-04, 06:33 PM
PerHP PerHP is offline
New Member
 
Join Date: Jul 2003
Location: Bergen, Norway
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Hi there,

Your questions are a bit difficult to answer immediately without some more info, but I'll give it a try.

DISPLAY:
$search=$_GET['search'];
- Create a form and send the query away to a page with this code:
$sql="SELECT id, model, year, price FROM cars WHERE model LIKE '$search' OR year LIKE '$search' OR price LIKE '$search' ORDER BY price";

MORE DETAILS:
- A new page which displays the info for the car with the designated id:
$sql="SELECT * FROM cars WHERE id=$id";

Of course it can be made more advanced and functional, but this hopefully gives you an idea.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to link images and swf for banner tracking Xtremist JavaScript 2 12-14-03 12:00 PM
Passing a table or variable through a link? chinablack1480 PHP 1 12-07-03 03:55 AM
Create a next page link when there are too many records to be display in a webpage Han84 ASP 0 10-19-03 10:32 PM
Different type of link counter mdhall Script Requests 2 10-10-03 01:19 PM


All times are GMT -5. The time now is 07:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.