Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.