Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php redirect syntax

Featured Replies

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

  • Author

Works a treat thank you Craig

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.

  • 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????

  • 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.

  • 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?

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.