Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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 ?

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    echo 'http://www.xxx.com/radiofm.php?id=' . intval($_GET['id']);

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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" ?

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    You would store the product information in the database, and select it using the id passed via GET in the url.

  • #5
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ?

  • #6
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •