Online Store Application Implementation – continue
Segment
of Customer.cgi
if ($state==0) {
state0();
$state=1;
}
elsif ($state==1) {
if (param('msg') eq 'Available') {
$state=2;
state2();
}
elsif (param('msg') eq 'Not Available') {
$state=0;
state2();
}
else {
state1();
}
}
elsif ($state==2) {
if (param('msg') eq 'Products') {
$state=3;
state3();
}
else {state2();}
}
elsif ($state==3) {
state0();
$state=0;
}
else {
print "</html>";
exit;
}
Click here to download Customer.cgi.