Connecting Tech Pros Worldwide Forums | Help | Site Map

back button not working

Newbie
 
Join Date: Sep 2007
Posts: 15
#1: Mar 24 '08
hi guys ,
i have developed a website which works fine in one server but not working in another server.
the problem is i have a back button which goes to another program
here is the code:
[php]
if ($back == "Back") {
header("Location:a_user_outline.php");
}
<td align="center"><input type="submit" name="back" value="back" size="40" ?>">[/php]
the server which works fine has the following version
php 4.4.4
mysql 4.1.22-standard
apache 1.3.37

the server which doesn't work has the following version
php 4.4.8
mysql 4.1.22-standard
apache 2.0.63

cud anyone help me

Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR

Member
 
Join Date: Nov 2007
Location: Russia, Saint-Petersburg
Posts: 82
#2: Mar 24 '08

re: back button not working


Hi. I think the problem is in register_globals option. Try this:
[php]
if ($_REQUEST['back'] == "Back") {
header("Location:a_user_outline.php");
}
<td align="center"><input type="submit" name="back" value="back" size="40" ?>">[/php]

And note that string "Back" is not equal to "back".
Reply