Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Help with URL redirection

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Postby Oleg Butuzov » Sun Nov 10, 2002 9:16 am

sipmle method.

You can create table with adds links.
Strucrture for exemple:
Code: Select all
| ID | LINK                  |
| 1  | http://www.some1.com/ |
| 2  | http://www.some2.com/ |
| 3  | http://www.some3.com/ |
| 4  | http://www.some4.com/ |
| 5  | http://www.some5.com/ |



//and after that use such SQL query

Code: Select all
$numquery=mysql_query("SELECT * FROM `adds` );
$count=mysql_num_rows($numquery);
$id=rand(0, $count);



Code: Select all
$addquery=mysql_query("SELECT * FROM `adds` WHERE `id` =  '$id' ");
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 5 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron