|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
is this right syntax?
I have a live site that I'd like to change but don't want error in the updated code...BTW, it's PERL (but it's only if else so it should be relatively similar):
WAS: sub send_off { if ($call_sale_script_as eq "script") { print "Location: $aftersalenn"; exit;} elsif ($call_sale_script_as eq "image tag") { print $q->header(-type=>"image/gif"); open (FILE, "$invis_graphic_path"); flock(FILE, 2); print <FILE>; flock(FILE, 8); close (FILE); exit; } CHANGED TO: sub send_off { $aftersale1 = http://www.mysite.com/page1.php; $aftersale2 = http://www.mysite.com/page2.php; if ($call_sale_script_as eq "script") { if ($item_number == 150) {print "Location: $aftersale1nn"; } else {print "Location: $aftersale2nn"; } exit;} elsif ($call_sale_script_as eq "image tag") { print $q->header(-type=>"image/gif"); open (FILE, "$invis_graphic_path"); flock(FILE, 2); print <FILE>; flock(FILE, 8); close (FILE); exit; } |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > is this right syntax? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|