Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-10-2007, 07:44 AM   PM User | #1
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
call the first url and appear the second in a php/mysql site ?

http://www.xxx.com/products.php?id=8
http://www.xxx.com/radiofm.php at id=8

how to call the first url and appear the second in a php/mysql site ?
lse123 is offline   Reply With Quote
Old 11-10-2007, 03:22 PM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
echo 'http://www.xxx.com/radiofm.php?id=' . intval($_GET['id']);
Inigoesdr is offline   Reply With Quote
Old 11-10-2007, 03:30 PM   PM User | #3
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
I am mean how the product at
http://www.xxx.com/products.php?id=8
is
http://www.xxx.com/radiofm.php
and not
http://www.xxx.com/tvset.php
???
Is needed any code insert in the products page(radiofm.php,tvset.php) relevant to corresponding "id" ?
lse123 is offline   Reply With Quote
Old 11-10-2007, 03:54 PM   PM User | #4
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
You would store the product information in the database, and select it using the id passed via GET in the url.
Inigoesdr is offline   Reply With Quote
Old 11-12-2007, 07:36 AM   PM User | #5
lse123
Regular Coder

 
Join Date: Dec 2005
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
lse123 is infamous around these parts
I want the search(query) table results, in the html table to be products, and when I click a product title go to product's personal webpage, well these personal webpages will be eg:
http://www.xxx.com/tvset.php
http://www.xxx.com/radiofm.php
http://www.xxx.com/iron.php
http://www.xxx.com/freeze.php
http://www.xxx.com/kitchen.php
is any way link such to product title or needed other code like:
http://www.xxx.com/products.php?id=8
http://www.xxx.com/products.php?id=9
http://www.xxx.com/products.php?id=10
http://www.xxx.com/products.php?id=11
........................................................
........................................................
if needed othe code, how to relate eg
http://www.xxx.com/products.php?id=9
to a product url like http://www.xxx.com/radiofm.php
is any way for this ?
lse123 is offline   Reply With Quote
Old 11-12-2007, 05:58 PM   PM User | #6
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Yes, you can use mod_rewrite to pass the product name to a PHP page, and use PHP/MySQL to search for the product in the database. You should be able to find some examples on Google.
Inigoesdr is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:13 PM.


Advertisement
Log in to turn off these ads.