You are here:  » PHP 5 problem

Support Forum



PHP 5 problem

Submitted by hkba01168 on Tue, 2008-09-23 09:02 in

Hi David

Hope you're well. I use the following simple jump script to redirect links which works in php4, however, it does no appear to work in php5.

Main data file contains:

<?
$go = $_GET['go'];
if ($go == "1") {$link = "index.php";}
header("Location: $link");
exit();
?>

Redirect called by:
jump.php?go=1

Do you know where the problem is please?

Regards

Bernard

Submitted by support on Tue, 2008-09-23 09:44

Hi Bernard,

Syntactically it looks fine - have you tried using "View > Source" to see if an error message has been generated which is preventing the header() function from working...?

Cheers,
David.

Submitted by hkba01168 on Wed, 2008-09-24 11:57

Hi David

I've not looked at the source, however, what it does is just displays the content of the data file and doesn't redirect, whereas using php4 it does redirect.

Regards

Bernard

Submitted by support on Thu, 2008-09-25 07:15

Hi Bernard,

It's not simply a case of your new installation not being configured for the short-hand PHP delimiters is it? At the very top of your script, instead of:

<?

Try using:

<?php

Cheers,
David.