473,395 Members | 1,987 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,395 software developers and data experts.

Internet Explorer reports 'page not found' when logging in

150 100+
My problem is when i login to my website it says can't found the page in inernet explore only when i refresh the page i login to the page, that is my code in the login page:
[PHP]<?php include_once("Connections/Login_functions.php"); include(Data()); ?>
<?php
//---------------------------------------------
if($_POST['loginBTN']){
if(!($userLOGIN=="" || $passLOGIN=="")){
$result=mysql_query("SELECT username,Password FROM users WHERE username='$userLOGIN' && Password=PASSWORD('$passLOGIN')");
if(mysql_num_rows($result)==1){
setcookie("userLOGINCookie",$userLOGIN,time()+(60* 60));
header("Location:".$_SERVER['PHP_SELF']);
}
}
}
if(isset($_COOKIE['userLOGINCookie'])){
$COOKIE=$_COOKIE['userLOGINCookie'];
$info=mysql_query("select username from users where username='$COOKIE'");
$data=mysql_fetch_array($info);
if($data[0]){

}else{
setcookie("userLOGINCookie",'',time()-(60*60));
header("HTTP/1.0 404 Not Found");
exit;
}
}
?>[/PHP]
Sep 3 '07 #1
3 1477
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Sep 3 '07 #2
Atli
5,058 Expert 4TB
Hi.

This might be a caching problem.
Try adding a 'Cache-Control' header to the top of the script:
Expand|Select|Wrap|Line Numbers
  1. header("Cache-Control: no-cache");
  2.  
Sep 3 '07 #3
mwasif
802 Expert 512MB
In addition to Atli's suggestion, make sure there should not be any output (including a whitespace) before header(). Use only one "<?php" tag. I have removed closing ?> and opening <?php from line 1 and 2 respectively.

[PHP]<?php include_once("Connections/Login_functions.php"); include(Data());
//---------------------------------------------
if($_POST['loginBTN']){
if(!($userLOGIN=="" || $passLOGIN=="")){
$result=mysql_query("SELECT username,Password FROM users WHERE username='$userLOGIN' && Password=PASSWORD('$passLOGIN')");
if(mysql_num_rows($result)==1){
setcookie("userLOGINCookie",$userLOGIN,time()+(60* 60));
header("Location:".$_SERVER['PHP_SELF']);
}
}
}
if(isset($_COOKIE['userLOGINCookie'])){
$COOKIE=$_COOKIE['userLOGINCookie'];
$info=mysql_query("select username from users where username='$COOKIE'");
$data=mysql_fetch_array($info);
if($data[0]){

}else{
setcookie("userLOGINCookie",'',time()-(60*60));
header("HTTP/1.0 404 Not Found");
exit;
}
}
?>[/PHP]
Sep 3 '07 #4

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

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
4
by: Nicolás Castagnet | last post by:
Hi, I write this post because I notice a strange behavior related with "Temporary Internet Files" and maybe some of you can help me to understand it. I am working in a web application with...
11
by: Wendy | last post by:
Hello, I have a program that does the following: When a user clicks on a row in a VB.NET datagrid, it will open a web page in Internet Explorer (that corresponds to that item in the selected row...
2
by: Yuv | last post by:
Hi, When one of my users are navigating my ASP website, and click on submit type button to move from Page1.asp to another ASP page, Page2.asp, they are getting message like "Internet explorer...
3
by: laredotornado | last post by:
Hi, This problem only affects PC IE. On a secured page (a page visited via https), there is a link that reads -- "Download HTML File". The link connects to this page <?php...
10
by: Lorie0114 | last post by:
Hello, We have an issue that I do not know how to resolve. Our website has several hundred reports. There are a handful of them that are causing issues when there is no interaction for a couple...
0
by: Christian W Larsen | last post by:
I want to export a datagrid to Excel. Here is the code: Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");...
2
by: =?Utf-8?B?U1VOTlk=?= | last post by:
Hi I have a web application(website) from which i generate reports. I code behind used is asp.net. When i give a small date range to generate reports it works fine, but when i give a big date range...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.