Current location: Hot Scripts Forums » Programming Languages » PHP » Jump.php Script Problem - need help


Jump.php Script Problem - need help

Reply
  #1 (permalink)  
Old 10-08-05, 01:41 AM
Liz Liz is offline
New Member
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Jump.php Script Problem - need help

Hi, I've been using this script that I found here for about a year, but it's stopped working and I really need some help:
http://www.programmingtalk.com/showthread.php?t=3972

It was working great, but then my server's hard drive died and I was given PHP 4.3.7. Now this script gives me the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/url/jump.php:7) in /home/url/jump.php on line 8

I have been looking all over the Web for an answer and I can't fix it. I already checked to make sure this script has no white spaces. I tried putting the <HTML> etc. after the <?php ... ?> and that doesn't work.

Does anyone have any idea how to fix this? I am a total novice at PHP - I barely understand it. But this jump script is used throughout my site and was working so much better than CGI that I really rely on it in my drop-down menus and forms. I bet it's something stupid that I've done wrong, but I honestly have no idea how to fix it.

Here is my version of this script. Thanks for reading my message, and please, please help if you can!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jump</title>
</head>
<body>
<?php
header("Location: $goto");
?>
</body>
</html>
Reply With Quote
  #2 (permalink)  
Old 10-08-05, 02:55 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/url/jump.php:7) in /home/url/jump.php on line 8
means that there was output before header() function called.
and it's true in your case!
since it's a redirection code, don't put all those html tags! it will save you bandwidth and it's not needed.
so use this one instead:
PHP Code:

<?php

$goto 
$_REQUEST['goto'];
header("Location: $goto");
?>
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 10-08-05, 09:53 AM
Liz Liz is offline
New Member
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you so much! It works now! I really appreciate it.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raffle/Lottery Script (Very profitable!), Coded it myself. Voltaire General Advertisements 6 03-16-09 07:15 AM
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP script problem (please help) osmanmumtaz PHP 0 05-24-05 07:29 AM
Creating Website Script Problem Dainbramaged05 PHP 4 06-30-04 12:29 PM
Problem with Image Slideshow script jthornton13 JavaScript 1 06-24-04 09:27 PM


All times are GMT -5. The time now is 06:14 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.