Page 1 of 1

header problem

Posted: Thu Aug 30, 2007 1:21 pm
by itsmani1
when i click submit it takes me to: addproduct.php
and shows:

The page cannot be displayed

Please help me in this regard
I don't think there is some problem but its not working.

thanks

Code: Select all

<?PHP
session_start();
if(isset($_SESSION["login"]) and ($_SESSION["login"] == TRUE))
{
	include "../connection.php";
	if(isset($_POST["Submit"]))
	{
		header("Location:http://www.google.com");
		exit;
//		header("Location:addproduct.php?log=Image uploading filed");
		exit;

	}
}
?>

Posted: Thu Aug 30, 2007 1:25 pm
by kendall
are you sure you have the correct url...


maybe [s]u[/s] you need to be a bit more explanatory in order to get a more accurate response for a solution
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Thu Aug 30, 2007 1:29 pm
by itsmani1
kendall wrote:are you sure you have the correct url...


maybe u need to be a bit more explanatory in order to get a more accurate response for a solution

Yes, It works fine on FF but on IE it takes me to "addproduct.php" and show "The page cannot be displayed" but when i refresh again it takes me to correct page again

Posted: Thu Aug 30, 2007 1:32 pm
by kendall
let me see the url....ill try it in my FF and IE...if its showing up in one and not the other it could be a browser specific issue...however you said you had to refresh for it to display...there is probably a session not being set issue...

Posted: Thu Aug 30, 2007 1:37 pm
by itsmani1

Posted: Thu Aug 30, 2007 1:42 pm
by John Cartwright
Try

Code: Select all

header("Location: http://www.outsourcingi.com/ecom/admin/ ... ?log=Image%uploading%filed");
It is always recommended you avoid relative paths using header()

Posted: Thu Aug 30, 2007 1:42 pm
by kendall
well i tried the form

and it went [s]str8[/s] straight to the google home page...as is expected judging from the code...you would probably want to uncomment the line for me there dude.... :wink:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Thu Aug 30, 2007 1:45 pm
by kendall
well my work here is done :P :D

Posted: Thu Aug 30, 2007 1:48 pm
by itsmani1
Please open this page in IE and FF
and press submit
you will see result.

thanks for reply

Posted: Thu Aug 30, 2007 1:50 pm
by itsmani1
Here is the code, for FF it works file but not for IE, I don't know where is problem

Code: Select all

include "../connection.php";
	if(isset($_POST["Submit"]))
	{
		header("Location:http://www.google.com");
		exit;

Posted: Thu Aug 30, 2007 2:12 pm
by itsmani1
this is creating problems:

If html form following is creating problem:


"enctype="multipart/form-data""

If i remove it works fine but i need to upload image as well.


thanks