#!/usr/bin/perl use strict; use warnings; use CGI; use Data::Dumper; my $q = CGI->new(); print $q->header(); my $transac = $q->param( 'transac' ) || ''; # Get values my $user_name = $q->param( 'user_name' ) || ''; my $user_id = $q->param( 'userid' ) || ''; my $city_from = $q->param( 'city_from' ) || ''; my $state_from = $q->param( 'state_from' ) || ''; my $checkin_comments = $q->param( 'checkin_comments' ) || ''; print "
Display Results once the submit gets done: *$user_name*$user_id*$city_from*$state_from*$checkin_comments*
"; if($transac eq "checkin") { my $res = results(); print "
*$res* $user_name*$user_id*$city_from*$state_from*$checkin_comments*
"; }else { start_html(); } sub results { if ($user_name) { return 'success'; } else { return 'error'; } } # End sub results sub start_html { my $html_code = qq ( jquery from hell
[ Check-In ]
  
); print $html_code; #return $html_code; } # End start_html sub