Hello,
Why are you not using CGI.pm? Why are you parsing the data yourself?
Doing so is very error prone and you *will* get into trouble.
Try doing the following in your script:
#!/usr/bin/perl -w
use strict;
use CGI qw/param/;
my $name = param('Name');
my $age = param('Age');
my $city = param('City');
print "Content-type: text/html\n\n";
print <<EOF;
<html>
<head>
<title> <h2> This is an example for the post method </h2> </title>
</head>
<body>
<table border = 4 >
<th align=left><h3> NAME </h3>
<th align=left><h3> AGE </h3>
<th align=left><h3> CITY </h3>
<tr><td> $name <td> $age <td> $city </table>
</body>
</html>
EOF
Hope this helps,,,
Aziz,,,
> hai
> i tried to pass three variables & obtain the output to be in table
> format .but i could not get any output.
> The code is as follows.
>
> my html program (calling)
> <html>
> <head>
> <title> <h2> Post Method </h2> </title> </head>
> <body>
> <pre>
> <form method = "post" action = "http://mc6308/cgi-bin/check.cgi"><br>
> Name <input type = text name = "Name"> <br> Age <input type = text
> name = "Age"> <br> City <input type = text name = "City"> <br>
> <input type="submit" name="Submit" value="SUBMIT">
>
> </pre>
> </form>
> </body>
>
>
> my cgi program (called )
> print "Content-type: text/html \n\n";
>
> $indata = <STDIN>;
> @store = split("&",$indata);
> for($i=0; $i<=$#store; $i++)
> {
>
> ($name[$i],$value[$i]) = split ( "=", $store[$i] );
> $value[$i] =~ s/%(..)/pack ("C",hex($1))/ge; $value[$i] =~ s/\+/"
> "/ge;
> }
> $i=0;
>
> print <<"EOD";
>
> <html>
> <head>
> <title> <h2> This is an example for the post method </h2> </title>
> </head>
> <body>
> <table border = 4 >
> <th align=left><h3> NAME </h3>
> <th align=left><h3> AGE </h3>
> <th align=left><h3> CITY </h3>
> <tr><td> $value[ $i] <td>$value[++$i] <td> $value[++$i] </table>
> </body>
> </html>
> EOD
>
> What is the problem ? How to change it
>
> Thank you
> With Regards..
> Arun.
>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]