defined in a nother cgi script? Suppose I have data.cgi, where $number is defined and &number is defined. I want to call these from call.cgi. How would I do this? Thanks.
Oh by the way, anybody know why i'm getting those "stars" automatically without anyone clicking on it? That happened last post, too. Don't worry, it's not counted. ---------------------------------------- There is no Knowledge, That is not power.
Yes, i'm a MySQL Newbie.
Age: 16
E-mail: projectnet01@cs.com
Companynot done yet)
-Aaron
----------------------------------------
Hmm the trouble with require is it does the other cgi script over again. I just want to be able to call variables that were defined in the other cgi script, not to print it out all over again.
I found the problem. You need to add an exit function after the code Here's an example:
if ($FORM{'email'} eq "" {
print "error";
exit;
}
Yes, it's a bad example but I don't know how your subroutine looks like. If you could show me your code, then i'll show you where to add the exit function. ---------------------------------------- There is no Knowledge, That is not power.
Yes, i'm a MySQL Newbie.
Age: 16
E-mail: projectnet01@cs.com
Companynot done yet)
-Aaron
----------------------------------------
Sorry if i'm geting back to you late. I had school and stuff but it seems yo're having problem with the yahtzee.cgi. Can you email me the whole code in a zip file. I don't see any problems with the code listed above.
projectnet01@cs.com ---------------------------------------- There is no Knowledge, That is not power.
Yes, i'm a MySQL Newbie.
Age: 16
E-mail: projectnet01@cs.com
Companynot done yet)
-Aaron
----------------------------------------
Sorry danieleloff@hotmail.com. Your mail to projectnet01 could not be delivered
because projectnet01 is not accepting mail with attachments or embedded images
#!/usr/local/bin/perl
#Yahtzee
print "Content-type: text/html\n\n";
&roll;
sub roll {
print <<EOF;
<form method="POST" action="roll.cgi">
Dice one rolled
<input type="checkbox" name="C1" value="ON">
EOF
&dice;
$dice1 = $num[0];
print "<br>";
print <<EOF;
Dice two rolled
<input type="checkbox" name="C2" value="ON">
EOF
&dice;
$dice2 = $num[0];
print "<br>";
print <<EOF;
Dice three rolled
<input type="checkbox" name="C3" value="ON">
EOF
&dice;
$dice3 = $num[0];
print "<br>";
print <<EOF;
Dice four rolled
<input type="checkbox" name="C4" value="ON">
EOF
&dice;
$dice4 = $num[0];
print "<br>";
print <<EOF;
Dice five rolled
<input type="checkbox" name="C5" value="ON">
EOF
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.