Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
your test.cgi now:
$foo = $cgi->param('ID'); #or whatever your way of getting the ID
line 1
line 2
line 3
line 4
your test.cgi after:
$foo = $cgi->param('ID');
&print_id($foo)
sub print_id
{
my $foo = @_;
line 1
line 2
line 3
line 4
..........
..........
}
require "../html/test.cgi";
&print_id($my_id);
line 3
line 4
........
template.cgi:
%template=(
'header'=>qq{<html>
<head>
<title>My title</title>
<body>
<table>
},
'form' =>qq{ <tr>
<td>First Name:</td>
<td><input type="text" name="FirstName" value="$FirstName"></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="LastName" value="$Lastname"></td>
</tr>
},
'footer' =>qq{
<input type="submit" name="submit" value="submit">
</table>
</body>
</html>
}
);
1;
#!/usr/bin/perl
require("template.cgi");
$query = new CGI;
print $cgi->header;
print $template{'header'};
if the guy is already registered and he has a name then search the database found them.
put them inside two variables
$FirstName, $LastName
and then
print $template{'form'};
the fields will be already filled. If he is not registerd then they will be empty cause inside $FirstName, $LastName there is nothing
print $template{'footer'};
exit 0;