electron
Dec 1 2006, 05:34 PM
| | Hi,
I am using the header function to redirect after the processing of the form. I have to specify a internal link using '#link'.
This works in Firefox and opera. But in Internet Explorer internal linking when done from a redirect is not working for somewhat reasons.
e.g. header("Location: http://www.example.com/index.php#link");
this works in Firefox and Opera but not in Internet Explorer . IE just accepts 'http://www.example.com/index.php' instead of http://www.example.com/index.php#link
Please help me if you know anything about this. Well there might be a issue in Internet Explorer 7 and i dont have Internet Explorer 6. If you know of such bugs in Internet Explorer 7 or any such bugs in PHP let me know.
Thanks and have a good day. |
Reply
shadowx
Dec 1 2006, 10:27 PM
that's strange, it probably is an error in IE7 if it works in other browsers, if theres any way of putinng the code online i, or someone else can test it in IE6, FF opera etc as well and see if we get errors too. You using the #link to focus the browser on a specific part of the page right? in which case i would definately say its a browser based problem not a code based one.
Reply
biscuitrat
Dec 3 2006, 05:06 AM
You were doing this, right?: CODE <a href="http://www.example.com#link">This is anchor text</a> <a id(or name)="link"></a> This is the text at the beginning of a paragraph
Please post your code so we can check it!
Reply
detportal
Dec 3 2006, 09:13 AM
Isn't there something you can do on the cPanel, assuming you are hosted on trap17? They have something you can do to manage redirects, though I'm not sure if you can configure it to activate after you process a form. And I agree with the previous poster, you should paste your code here so we can have a look at it.
Reply
Spectre
Jan 9 2007, 05:14 PM
This has nothing to do with cPanel or with linking. And he did post his code. I've never encountered this problem as such, electron, but when I did a little experimenting with it I got some interesting results. Some of the time it would work fine for me and do exactly what it was supposed to - but other times there was some unusual behavior by the browser, including displaying the incorrect URL in the address box, displaying the correct URL but without the fragment, and displaying the fragment but not scrolling to it. As you said it works fine in Opera and FireFox, so perhaps it's connected to a bug in IE7 that hasn't been ironed out yet?
Reply
coby
Feb 18 2007, 04:02 AM
I've also encountered this problem as such, electron, but when I did a little experimenting with it I got some interesting results. Some of the time it would work fine for me and do exactly what it was supposed to - but other times there was some unusual behavior by the browser, including displaying the incorrect URL in the address box, displaying the correct URL but without the fragment, and displaying the fragment but not scrolling to it. As you said it works fine in Opera and FireFox, please use this code in your php code, it's worked fine with me echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"1; url=".$PHP_SELF."#link\">"; coby
Reply
Recent Queries:--
process_login.php "blank page" - 129.01 hr back.
-
http_redirect $_post - 225.67 hr back.
Similar Topics
Keywords : header, redirect, errors
- Fopen Errors :(
grrr, i'm angry :( (6)
Http_redirect() [resolved]
(4) i am writing a script, and whenever i use this line CODE
http_redirect("process.cgi"); i get a call to undefined function error for
http_redirect(). maybe i am misunderstanding what this function is used for..... when i call it, it
will take the user to the page indicated... in my case "process.cgi" that was my interpretation of
it from the page in the php manual. i am running xampp for windows and php 5.2.1....
New Found Php Coding Errors
I always thought these worked, but suddenly they no longer do?! (5) Hi i'm dan from new zealand, right next to my home land australia. I have been writing php
scripts for two years now and just recently none of them have been working. Please help me out as
best as you can, i'm sure it is only something simple. CODE ----------------Form
1-------------------------- <?php // ---- Customized form script for the HBRC---------------
// Receiving variables ----------------------------------- @$fn =
addslashes($_POST['fn']); @$ln =
addslashes($_POST['ln']); @....
[php] Header Function
(2) Header function Greetings we are going to use the header() funtion to redirect start making a
file called page.php at the top of the file add CODE <?php ?> Example 1 After
CODE header('Location: http://www.trap17.com'); the LOCATION means
where you want it to go. Example 2 you also can define a file that you want to redirect to After
CODE header('Location: index.php'); Example 3 you also can add a timer to
it /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt=....
Email Header Inject Test
(0) So I'm trying to write a script to check if someone is trying to do a header inject using my web
based email form. The problem is that, regardless of the content, it is being tagged as hijacked.
The following is the relevant part of my code: CODE $ip=$_POST['ip'];
$httpref=$_POST['httpref'];
$httpagent=$_POST['httpagent'];
$visitor=$_POST['visitor'];
$visitormail=$_POST['visitormail']; $s....
Script Not Working :s
mysql errors (5) process_login.php: Process the login. $host = "localhost";// the host that u are connecting
$username = "root";// user name $password = ""; // passworld $basedatos =
"forum"; //Dont change this1. $db = mysql_connect($host, $username, $password);
mysql_select_db($basedatos, $db); $user= $_REQUEST ; $pass=
md5($_REQUEST ); $query1= "SELECT * FROM smf_members WHERE
memberName='$user'"; $mkquery= mysql_query($query1,$db); $row1=
mysql_fetch_assoc($mkqu....
Php Header Problem
i always got header problem (9) i really hate the header function it always get an error saying ( cannot ------- headers already
sent by----- ) and here's my error: Warning: session_start(): Cannot send session cookie -
headers already sent by (output started at /home/adly3000/public_html/Mail/index.php:5) in
/home/adly3000/public_html/Mail/index.php on line 81 Warning: session_start(): Cannot send session
cache limiter - headers already sent (output started at /home/adly3000/public_html/Mail/index.php:5)
in /home/adly3000/public_html/Mail/index.php on line 81 Warning: Cannot modify header ....
php header() function help needed
automatic re-direct (4) hey ppl, u seem to have real gud knowledge about php, i just wanted a little help...i designed this
website, but i want that if i click on certain page, it should open for some few seconds and then
browser should automatically redirect me to some other page....i tried this with header() function
but i couldnt do the wait n redirect part, ... so somebody plz help.... -thanx in advance!....
Problem With Page Redirect
Help me out with this problem... (7) hey ppl, i just wanted a little help...i designed this website, but i want that if i click on
certain link, it should open new page for few seconds and then browser should automatically redirect
me to some other page....i tried this with header() function but i couldnt do the wait n redirect
part, ... so somebody plz help.... -thanx in advance! Thanks Avalon, topic changed. ....
Need Help With The Header() Function
I am redirecting from my old site (2) Over a month ago, I bought a domain name for my site, but my site is still not indexed. I did
everything needed to get indexed, but I forgot one thing: The old site had exactly the same content
as the new one. So I had duplicate content. Therefore, I want my old site to redirect the user to
the new site with this script: CODE <?php header("Location:
http://www.global-rs.com" . $_SERVER['REQUEST_URI']); exit; ?>
global-rs.com is my new URL. However, on my old site, which I will be placing this code on, there
i....
.htaccess Redirect Question
redirect ALL traffic to another domain (6) I want to redirect all my traffic from one site to another domain name. Is this possible, and if so,
would I do something like this: .htaccess code: CODE redirect 302 /
http://www.mynewdomain.com Thanks!....
Spacer Below Header :s
(3) Below my header, which includes the logo and a horizontal menu bar, there is an empty space of the
size of a linebreak. I'm completely new to PHP... My header is an include tag , and where the
top.htm site should end, there is a linebreak that I can't remove... Is there a way to remove
it? Also, it happens in my vertical menu too, and below the footer, but it doesn't really
affect the design.....
Getting Errors On A Script
need to know what im doing wrong (3) ok please help me!! im trying to get this tournamt/leage ladder script working, its with php
but i think i put all the files in the right palces but i keep getting this error .... CODE
Warning: main(modules/NukeLadder/admin/index.php): failed to open stream: No
such file or directory in /home/berkolli/public_html/DjLuki/admin/case/case.php on line 77
Warning: main(modules/NukeLadder/admin/index.php): failed to open stream: No
such file or directory in /home/berkolli/public_html/DjLuki/admin/case/case.php on line 77 W....
Problem With Headers
setcookie errors (5) I'm having troubles with my authentication function, if the the users uses wrong login info, it
works like a charm, but it gives me errors when i set the cookies, so help would be appreciated...
CODE Function auth(){ $user=$_POST['username'];
$pass=$_POST['password']; $qry="SELECT id from Solarity where
username='$user' and password='$pass'";
$result=mysql_query($qry) or die("A problem occured during authentication
process"); $....
Url Redirection
redirect a page web to another page (7) Hi Is there some functions in php to redirect a page web to another page. thanks....
Getting Rid Of Errors
(4) Hi Is it ok to use error-reporting(0) locally in a snippet of code that spits an undefined variable
error? I found that fix and was wondering what does everybody do about error messages that keep
poping up. Thanks Patrick....
Question On Header() Function
(3) Hello I have a question regarding the header(location:http:// etc) function. I have a php document
that looks similar to the followiing //now some code specific to this page only if blah blah {
do some stuff } else { header("location : http://some_page.php"); } include ("./bottom.php");
//this file contains loads of html and is resident on all pages in the site IT HAS TO BE HERE -----
my question is this, how can i redirect to a new page using the header() function in the middle of
a file like this ie when i have already passed a load of html and other stuf....
Mysql Errors
cant find whats wrong :( (3) I am working on my guestbook, better to say I am transfuring it from old to new site, but I got some
errors now I did not had at my old hoster and I cannot figure out whats wrong: CODE
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
/home/pbrugge/public_html/guest.php on line 104 Warning: mysql_fetch_array():
supplied argument is not a valid MySQL result resource in /home/pbrugge/public_html/guest.php on
line 110 This is the complete relevant code perhaps I overlooked something but I keep ove....
header()
redirection (1) CODE <?php if($_REQUEST['name']==NULL) {
header("Location:?name=Guest"); } else { ?> <html> <head>
<title>Welcome</title> </head> <body bgcolor=black> <?php
echo "<font color=gray><b>Hello, "; echo
$_REQUEST['name']."</b><p>"; ?><pre>
<?php for($i=0;$i<10;$i++) {
for($j=0;$j<10;$j++....
Looking for header, redirect, errors
|
|
Searching Video's for header, redirect, errors
|
advertisement
|
|