473,387 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem in session redirecting - IE

134 100+
Hi

I have created a loginpage in which the user enters their username and password.,
the page gets loaded and validates the input and then it is redirectesd to the seeeion page using html code.,
Expand|Select|Wrap|Line Numbers
  1. correct code tags usage<?
  2. if(username and password is correct)
  3. {
  4. ?>
  5. <meta http-equiv="refresh" content="0,url=session.php?user=<? echo $user;?>" >
  6. <?
  7. }
  8. ?>
  9.  
., this is my code and once again in session page i am redirecting the datas in to another page using the same code.,

the code works well with firefox but not in IE.

In IE the same page itself gets loaded again and again.
the page was not redirected..

And i had tried even by php redirectin
Expand|Select|Wrap|Line Numbers
  1. header( 'Location: session.php?user='.$user ) ;
  2.  
but i am responded with the error.,
"Headers already sent".

and tried even by giving the full path.,which results in the same errors.


can anyone help me??


regards
vijay
Apr 12 '08 #1
7 2433
Markus
6,050 Expert 4TB
the time to reload and url are seperated by a semi colon
Expand|Select|Wrap|Line Numbers
  1. content="5; url=somepage.php"
  2.  
Apr 12 '08 #2
vjayis
134 100+
the time to reload and url are seperated by a semi colon
Expand|Select|Wrap|Line Numbers
  1. content="5; url=somepage.php"
  2.  



Hi

thanks for ur help.,
works well in IE.,

regards
vijay
Apr 14 '08 #3
Markus
6,050 Expert 4TB
Hi

thanks for ur help.,
works well in IE.,

regards
vijay
Sweet!

And, in all honesty, this isn't a php problem - (php runs serverside and has nothing to do with the browser) - so consider this next time 'is my post more relevant to the html forum?'.

Regards,
markusn00b.
Apr 14 '08 #4
dlite922
1,584 Expert 1GB
Hi

I have created a loginpage in which the user enters their username and password.,
the page gets loaded and validates the input and then it is redirectesd to the seeeion page using html code.,
Expand|Select|Wrap|Line Numbers
  1. correct code tags usage<?
  2. if(username and password is correct)
  3. {
  4. ?>
  5. <meta http-equiv="refresh" content="0,url=session.php?user=<? echo $user;?>" >
  6. <?
  7. }
  8. ?>
  9.  
., this is my code and once again in session page i am redirecting the datas in to another page using the same code.,

the code works well with firefox but not in IE.

In IE the same page itself gets loaded again and again.
the page was not redirected..

And i had tried even by php redirectin
Expand|Select|Wrap|Line Numbers
  1. header( 'Location: session.php?user='.$user ) ;
  2.  
but i am responded with the error.,
"Headers already sent".

and tried even by giving the full path.,which results in the same errors.


can anyone help me??


regards
vijay
i suggest you use the later redirect (the server side with header("Location: ..."); )

It is safer.

The reasion you're getting that code is you're posting something to the page before the line is reach.

Put that line near the type of the page and make sure the file starts with <?php before anything else.
Apr 14 '08 #5
Markus
6,050 Expert 4TB
i suggest you use the later redirect (the server side with header("Location: ..."); )

It is safer.

The reasion you're getting that code is you're posting something to the page before the line is reach.

Put that line near the type of the page and make sure the file starts with <?php before anything else.
I don't believe there's anything safer about either of the approaches.

A problem with the meta redirects is that the browser may have them disabled - if this is the case you should provide a link stating 'click here if your browser (doesnt support meta redirects | doesnt redirect within 5 seconds)

A problem with header redirects is you have to be very, very specific with there placement, as dlite said.

Regards.
Apr 14 '08 #6
vjayis
134 100+
I don't believe there's anything safer about either of the approaches.

A problem with the meta redirects is that the browser may have them disabled - if this is the case you should provide a link stating 'click here if your browser (doesnt support meta redirects | doesnt redirect within 5 seconds)

A problem with header redirects is you have to be very, very specific with there placement, as dlite said.

Regards.


Hi

thanks for ur suggestion for both of u.,
regards
Apr 16 '08 #7
Markus
6,050 Expert 4TB
Hi

thanks for ur suggestion for both of u.,
regards
See you around!

kind regards
Apr 16 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
0
by: farooq | last post by:
Hi guys, I’m facing some problem can u solve it. Problem is: I’m giving user Id and password in (Login_sess.asp) and submit it to page (sess_test.asp). I am setting session variable...
1
by: farooqazeem | last post by:
Hi guys, I’m facing some problem can u solve it. Problem is: I’m giving user Id and password in (Login_sess.asp) and submit it to page (sess_test.asp). I am setting session variable...
3
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
14
by: Venkat Chellam | last post by:
I have a peculiar problem. I have a simple web application which loads some data from the oracle table and display in the datagrid in the webpage and datagrid has page enabled which shows 10 rows...
0
by: uraanu | last post by:
I am having an issue with sessions and httphandlers. I have some tracking information that I am passing in my url as folders (ie: www.mysite.com/info1/44/info2/55/mypage.aspx) which I am capturing...
4
by: moni | last post by:
Hi, I was hoping I could get a help on this one. I am creating a simple website, in which I have a login after which the user gets logged in using a session variable where I append the ID,eg ...
0
by: veerapureddy | last post by:
Hi All, I have some problem with browser caching I cleared the cache and also invalidated the session and redirected to the login page if the session has expired, in IE there is no problem if I go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.