![]() |
| ||
| Problems with redirecting...please help Hello, my script is giving me headache for two days. I have a paid to click site, when user clicks on paid links my script displays surf page, where i have a timer and an iframe that displays sponsored site below the timer. After the timer loads users have to pass captcha and after that success icon shows up. I wanted to change this success icon into redirecting to sponsored site and braking my frame. So far i am very close but i'm bad at javascript and php so i probably have some noob mistakes. View.php is the page where users see timer and iframe, in visit.php hides all code that displays captcha, error icon, success icon, credits user's acccount... This is the last part of visit.php that displays success icon after user clicked right captcha code: // HOORAY! SUCCESS! I tried to put this: // HOORAY! SUCCESS! because <?php echo $ad_row['url']; ?>, displays the real link of sponsored ad (it's used for iframe) in view.php, but ofcorse it doesn't work.... there were these functions in view.php that I copied to visit.php but it didn't help: $ad_id=limpiar($_GET["ad"]); I don't know how to put another echo in echo :D :D Can you plase solve these i tried googling for hours but no luck :( Thank you a lot! |
| ||
| Re: Problems with redirecting...please help You don't have to reopen the php tags in a heredoc (heredoc is the EOT thing you're using). So if $ad_row['url']contains the url, you can just include it as you would any other variable in php: // HOORAY! SUCCESS! The curly braces are for the array value. My source for heredoc info is http://www.hudzilla.org/php/2_6_3.php. (Tell me if this worked.) |
| ||
| Re: Problems with redirecting...please help Oh thank you a lot!!! It is redirecting properly, but to view.php?ad=xxx again, i hope i will solve that by myself. Thank you again! |
| ||
| Re: Problems with redirecting...please help Hm... it is weird what happens now.... I have this in view.php: <iframe src="<?php echo $ad_row['url']; ?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%" id="site"></iframe> And when i view page source in firefox i can see the real url of advertiser, but when i added this to visit.php it redirects to mydomain.com/view.php?ad=xxx again, not the real url. Maybe I need something to brake frame? Can you or someone help with this? Thanks in advance, a lot! |
| ||
| Re: Problems with redirecting...please help Hey, i found the problem, i was missing this: $ad_row=mysql_fetch_array($ad_result); Thank you kanaku for solving this! |
| All times are GMT -4. The time now is 1:31 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC