August 26, 200917 yr Can any one help me with a little syntax problem i have. Currently the code reads <?php header("location:http://www.brighton.uk.com/beta/$row_rbs_redirect['redirect']"); exit; ?> where the last part of the url is gathered from a recordset. The problem is in this area but i don't know what's wrong with it. I just inserted the code from the bindings panned in DreamWeaver. thank you
August 26, 200917 yr How about this: <?php $endurl=$row_rbs_redirect['redirect'];//To make thing easier header("location: http://www.brighton.uk.com/beta/".$endurl); exit; ?>
August 27, 200917 yr or <?php header("location: http://www.brighton.uk.com/beta/" . $row_rbs_redirect['redirect']); exit; ?> It just doesn't like you calling the array inside the quotations.
August 27, 200917 yr Author Could your code be modified just to send the url as a response rather that actually trying to redirect the browser to another page. The current code sends the "location:" text as well as the url The script only needs to send the redirect url rather than actually redirecting the browser. Hope i'm making sence????
August 27, 200917 yr Do you mean you want to display the redirect url to the user? So that they have the option to be redirected?
August 27, 200917 yr Author Mmmmmm not sure, its to do with the merchant account transaction to send people back to the correct page on my website. The little peice of code works fine if you just post a form the the php script it redirects perfectly. But the url needs to go back to the merchant account so tey can display the page. So it sort of needs to go back as just the url with nothing else. At the moment the response from the script shows 'location: http://www.brighton.uk.com/beta/standard_listing.htm' and I think its the 'location: text that is causing the problem.
August 27, 200917 yr When you say merchant account are you talking about PayPal or what? Either way you probably need to consult whichever documentation is linked to your merchant account.
August 27, 200917 yr Author RBS Worldpay, and their documentation isn't all that helpful. How would I change the code just to display the url rather than redirecting it?
August 27, 200917 yr If you wanted to just display the url it would be: <?php echo "http://www.brighton.uk.com/beta/".$row_rbs_redirect['redirect']; ?> And as a link: <?php echo "<a href='http://www.brighton.uk.com/beta/".$row_rbs_redirect['redirect']."'>http://www.brighton.uk.com/beta/".$row_rbs_redirect['redirect']."</a>"; ?>
Create an account or sign in to comment