...

View Full Version : call the first url and appear the second in a php/mysql site ?



lse123
11-10-2007, 07:44 AM
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 ?

Inigoesdr
11-10-2007, 03:22 PM
echo 'http://www.xxx.com/radiofm.php?id=' . intval($_GET['id']);

lse123
11-10-2007, 03:30 PM
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" ?

Inigoesdr
11-10-2007, 03:54 PM
You would store the product information in the database, and select it using the id passed via GET in the url.

lse123
11-12-2007, 07:36 AM
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 ?

Inigoesdr
11-12-2007, 05:58 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum