andre3 Posted April 19, 2008 Share Posted April 19, 2008 i have a ranking toplist site and wapmasters/webmasters can go there and add there sites to the catalog.. and after they register there site, they will be given a referal link to put back on there wap or web site.. i want it to work like this.. each time a user click the referal link on on a particular site .instead they automatically get sent to the index.php main page, i want wen the user clicks the referal link an if the refering site is on the 3rd page thats where the user is to be redirected to.. oh an i store all data in a mysql database an each page consists on 5 site. any help? thanks in advance Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/ Share on other sites More sharing options...
Fadion Posted April 19, 2008 Share Posted April 19, 2008 Give the referals you site's link with their id, like: www.yousite.com/index.php?referal=10. Then make a query with the referal id and show their page. Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521546 Share on other sites More sharing options...
Fadion Posted April 19, 2008 Share Posted April 19, 2008 Oh and if u cant think of showing the right page, just to give an idea: <?php $refID = mysql_real_escape_string($_GET['referal']); $itemsPerPage = 10; $pageToShow = ceil($refID/$itemsPerPage) * $itemsPerPage; $resultsPage = mysql_query("SELECT * FROM table LIMIT $pageToShow, $itemsPerPage"); ?> Not tested but it should give the idea. Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521554 Share on other sites More sharing options...
andre3 Posted April 19, 2008 Author Share Posted April 19, 2008 oh one thing i forgot to mention, i give them this link as the referal link with there id at the end: http://mydomain.com/in.php?sid=1 the in.php page updates the database with one hits! each time a new person clicks there referal link... and the index.php have a list of all the sites, so i was wondering is thats the page i must put the code u gave me on? Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521575 Share on other sites More sharing options...
Fadion Posted April 19, 2008 Share Posted April 19, 2008 U can use in.php?sid=xx as the referal page, update the views in database and send them to index.php?sid=xx. Or save the sid in a session before redirecting to index.php, its your choice. Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521584 Share on other sites More sharing options...
andre3 Posted April 20, 2008 Author Share Posted April 20, 2008 ook mate i put the code on in.php but it still dont work :S :-\ Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521647 Share on other sites More sharing options...
andre3 Posted April 20, 2008 Author Share Posted April 20, 2008 any more help?? i cant seem to get that to work properly, thnks in advance ??? Link to comment https://forums.phpfreaks.com/topic/101907-wap-site-toplist-help/#findComment-521932 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.