Solved

meta http-equiv="refresh" DOESN'T WORK AT GOOGLE CHROME BROWSER

Posted on 2009-04-10
6
2,392 Views
Last Modified: 2013-12-12
Hi!
Can you help me with this ?  I have a page with a meta tag for refresh into another page regarding the url ID I have.  It works fine at IE, firefox, Safari but not in Google Chrome.
If your type in all other browsers :  www.justclick4.info/home.php?RecordID=1   goes to a page I have specify and if I type www.justclick4.info/home.php?RecordID=2 goes to an other page.
But in Google Chrome it doesn't.
<html><head><meta http-equiv="refresh" content="0;url=http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"></head>

Open in new window

0
Comment
Question by:SOUANI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24114759
Seeing as you're using php and immediately redirecting the page, why don't you just do a 301 redirect.
This article explains about writing the Location header to redirect
http://www.phpf1.com/tutorial/php-redirect.html

Have a look at this w3c article explaining why you should use server side redirects.
http://www.w3.org/QA/Tips/reback
0
 

Author Comment

by:SOUANI
ID: 24114812
Thanks for the answer I know this redirect with Location Header but I how I will put t :  http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"> in the place of the url of the redirect ?   YOu cant write it like this. This works only inside html tags.

I dont know the right syntax.  I can do it with plain url ig. www.justclick4.info/index.php but I want to retrieve the url for my database

thank you
Penelope
0
 

Author Comment

by:SOUANI
ID: 24114851
to help you figure out what I am trying to do please see this:

How to write correct this code ?
<?php
    header('Location:http://$row_levels['statol_level']?RecordID=$row_owners['site_id']');
    die();
   
?>

like this I am getting an error
thank you ..

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:oobayly
ID: 24115111
Just concatenate the variables:
<?php
  header('Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);
  die();
?>

Open in new window

0
 

Author Comment

by:SOUANI
ID: 24121049
Hi!

I have put the suggested code but as you can see yourself it doesn't work.  url:  www.justclick4.info/home.php?RecordID=1

The url in my db are like this :  www.justclick4.info/index5.php (this is the field statol_level in table levers in mysql.
I assume I have them correct as the code you send me is like this Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);

thank you
0
 
LVL 15

Accepted Solution

by:
oobayly earned 500 total points
ID: 24121582
Can you give a few examples of what the statol_level & site_id are, and what url you want them to redirect to?
I can't quite follow how you expect "www.justclick4.info/index5.php" to change to " www.justclick4.info/home.php" without any string manipulation.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question