Jump to content

Problem probably caused by PHP 5 upgrade


hakiepoo

Recommended Posts

Hi,

I've got some PHP scripts that have stopped working.

 

The first was when I was trying to pass a variable in the URL from one page to the next.

http://farliggods.no/kurs/meldpa.php?kurs=239

 

I solved this by adding $kurs = $_GET['kurs']; in the code on the second page.

 

On this page, I have another problem that I can not seem to solve with this method.

I have an email form that, if some parameters are met, should send an email with lots of data. The full code I have used to execute this is:

 

$message="MESSAGE";

if ($send=="send"){

if ($navn!="" && $adresse!="" && $postnummer!="" && $sted!="" && $personnummer!="" && $firmanavn!=""){

if($oppfriskning=1) {

mail("[email protected]", "SUBJECT", "Navn: $navn\n\nAdresse: $adresse\n\nPostnummer: $postnummer\n\nSted: $poststed\n\nTelefon: $telefon\n\nMobil: $mobil\n\nE-post: $epost\n\nPersonnummer: $personnummer\n\nOppfriskning: Ja\n\nFirmanavn: $firmanavn\n\nFirma adresse: $firmaadresse\n\nFirma postnummer: $firmapostnummer\n\nFirma sted: $firmasted\n\nFirma telefon: $firmatelefon\n\nFirma telefax: $firmatelefax\n\n\nKurs: $tittel\n\nDato start: $startd.$startm.$starty\n\nSted: $sted\n\Pris: $pris\n\n", "From: [email protected]\nReturn-Path: [email protected]");

}else{

mail("[email protected]", "SUBJECT", "Navn: $navn\n\nAdresse: $adresse\n\nPostnummer: $postnummer\n\nSted: $poststed\n\nTelefon: $telefon\n\nMobil: $mobil\n\nE-post: $epost\n\nPersonnummer: $personnummer\n\nOppfriskning: Nei\n\nFirmanavn: $firmanavn\n\nFirma adresse: $firmaadresse\n\nFirma postnummer: $firmapostnummer\n\nFirma sted: $firmasted\n\nFirma telefon: $firmatelefon\n\nFirma telefax: $firmatelefax\n\n\nKurs: $tittel\n\nDato start: $startd.$startm.$starty\n\nSted: $sted\n\Pris: $pris\n\n", "From: [email protected]\nReturn-Path: [email protected]");

}

 

if($epost!=""){

if($pris!=""){

mail("$epost", "SUBJECT", "Navn: $navn\n\n\nKurs: $tittel\n\nDato start: $startd.$startm.$starty\n\nSted: $sted\n\nPris: $pris", "From: [email protected]\nReturn-Path: [email protected]");

}

else if($pris==""){

mail("$epost", "SUBJECT", "Navn: $navn\n\n\nKurs: $tittel\n\nDato start: $startd.$startm.$starty\n\nSted: $sted", "From: [email protected]\nReturn-Path: [email protected]");

}

}

header("Location: takk.php?kurs=$ref'");

}

else{

$message="MESSAGE";

}

}

 

I have asked my webhost to turn on globals, something they claim that they have done, but that hasn' helped.

 

Any help would be much appreciated.

Thanks!

At quick glance, it would seem to me that you had register_globals enabled before your upgrade and the upgrade has disabled them.  You should be able to re-enable them in your php.ini file.  You may also want to double-check on session.auto_start.  A lot of people that use register_globals also use session.auto_start and that may be another thing that has become disabled due to your upgrade.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.