Hello All Quick question. I have a script set up that passes an id number in the URL. The link ends up looking like this http://website.com/search.php?id=20 on the search php page I want the outbound link to pass the id (in this case 20) to the next page. Right now I tried to do this on the search.php page <a href='http://affiliatelink.com/83dd7?sub=<? echo $id; ?>'>click here</a> I dont have anything else on the page in the way of code to pull the value you. I feel like I might need something else like <? $id=$_GET['id']; ?> on the page somewhere but not sure. Any help with this would really be appreciated Thanks! Alex
Your warm. Not exactly sure what you are trying to do but I would read these http://www.w3schools.com/php/php_post.asp http://www.tizag.com/phpT/postget.php
Thanks for the help I have a landing page that pulls in info and gives the visitor an id. I can pass that id out of the landing page directly to the affiliate offer and it records it. Now what I want to do is add a page in the middle of this process but still have it pass the same id number, so it would look like this landing page -> jump page -> affiliate offer Does that clear it up a little? Thanks again
If on step one you make the value of id = 20 and go from that page to http://yoursite.com/jump_page.php?id=20 the value of id on the jump page is still 20 so if you have a link on jump page and call it just like you did <a href='http://affiliatelink.com/83dd7?sub=<? echo $id; ?>'>click here</a> the html after php has done it's job should read it should read http://affiliatelink.com/83dd7?sub=20 There's no need to redeclare the variable id again on the jump page
for some reason it does not seem to be going to second time through so after i click the link on the first page the url on top of the second page looks like this http://website.com/search.php?id=23 then on the search.php page i have link out that looks like this <a class='lin' href='http://affiliate.com/3hd7s3?sub=<? echo $id; ?>'>click here</a> Did i do somthing wrong maybe with the syntax for <? echo $id; ?>?? Thanks again for all the input
I would post the PHP code for the pages and explain. Kind of hard to see the problem without seeing the code.
Sure, here is the jump page code. Now looking at it iam wondering if the javascript at the top doing the redirect is not able to pull the id. <HTML> <HEAD> <TITLE>Find a deal</TITLE> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <style type="text/css"> <!-- .style1 { font-size: 17px; font-family: Arial, Helvetica, sans-serif; } .lin a:link { text-decoration: none; color: #000000; } .lin a:visited { text-decoration: none; color: #000000; } --> </style> </HEAD> <script type="text/JavaScript"> function changeContent(){ setTimeout(redirect, 1500); } function redirect(){ window.location.href = "http://affiliate.com/132sdf7?sub=<? echo $id; ?>"; } window.onload = setTimeout(changeContent, 1500); </script> <body> <center> <br> <br> <br> <br> <br> <br> <br> <br> <br> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><p class=style1 align='center'> Please wait, we are searching for the best deal<br><br> <img src="/img/loading.gif" width="48" height="48"><br> <br> If you are not automatically redirected, please <a href="http://affiliate.com/1df3s7?sub=<? echo $id; ?>">click here</a>. </p></td></tr> </table> </div> </center> </body> </HTML> PHP:
Well I can't see your $_GET where is it? I assume this is your url: yoursite.com/search.php?id=20 Now are you using PHP4 or PHP5? if you are using PHP5 then you need to use this PHP opening tag as <?php and not just <? Ok, now do some changing into your JavaScript redirect to as: function redirect(){window.location.href = "http://affiliate.com/132sdf7?sub=<?php echo $id=$_GET['id']; ?>";} Gonzo
I took the get out because it seemed that it was passed through the first page, do i need to add that to the second page?
hmm... to understand your problem, you need to post all your connecting pages, you can hide and change your data fields if you like, but to check your complete routine it is required. Gonzo
Rip out all that code and just do this: <html> <head> <?php echo "<meta http-equiv=\"refresh\" content=\"0;url=http://affiliate.com/1df3s7?sub=" . $_GET['id'] . "\"/>"; ?> One moment while you are automatically redirected. </head><body> PHP: