My God in heaven! Just one little character off and the whole Goddamn script is screwed. I have checked over it a thousand times, and it will not run properly. I don't know what it is, I tried looking for the small errors (being as those are usually the ones that catch you in the ass!) and I still can't seem to find it. Here's the script, for anyone that can read and understand perl. Maybe you could help me find out what it is that's wrong with it:
#!/usr/bin/perl
require "formprocessor.cgi";
&ReadParse(*input);
$name= $input{'name'};
$hate= $input{'hate'};
$form= $input{'form'};
$color= $input{'color'};
$election= $input{'election'};
$admire= $input{'admire'};
$death= $input{'death'};
$posession= $input{'posession'};
if ($form="plural")
{
pack of rabbid
}
if ($election="kerry")
{
Bush has won the election, and is now dominating the entire world.
}
if ($election="bush")
{
Kerry has won the election, and is now dominating the entire world. Even so, he still pulled the troops out of Iraq. Go figure.
}
print "Content-type: text/html\n\n";
print "<HTML><BODY>";
print "Here is your horoscope! Enjoy!";
print "Well first of all, $name, it seems as if my crystal ball is telling me that you will be consumed by a $color $hate.";
print "$election";
print "$admire has been kidnapped by aliens.";
print "You will meet your end very soon by $death";
print "Your $posession is now in a pawn shop in Florida. If you it is next to you, the moment you leave it, it will disappear.";
print "</BODY></HTML>";
--------------------------------------------------------
And here's the form that the above script processes:
<html>
<body>
<form method="post" action="http://rain.prohosting.com/jaredmg/horoscope.cgi">
<br>
<br>
<br>
<hr>
<pre>
What is your name? (First and Last) <input type="text" name="name">
</pre>
<br>
If there is one thing that you hate on this planet the most, what is it?<input type="text" name="hate">
<br>
Is that object that you mentioned in plural form or singular?
<br>
Singular<input type="radio" name="form" value="singular">
Plural<input type="radio" name="form" value="plural">
<br>
<hr>
<br>
<pre>
What is your favorite color? <select name="color">
<option value="red">red
<option value="orange">orange
<option value="yellow">yellow
<option value="green">green
<option value="blue">blue
<option value="purple">purple
<option value="brown">brown
<option value="black">black
<option value="pink">pink
</select>
</pre>
<br>
<hr>
<br>
Who do you want to win the election?
<br>
Bush<input type="radio" name="election" value="bush">
Kerry<input type="radio" name="election" value="kerry">
<br>
<hr>
<br>
Who in this world do you absolutely admire?<input type="text" name="admire">
<br>
<hr>
<br>
Describe in detail what kind of death you would hate the most, in this particulare format:
<br>
<u>Death by-(whatever it is)</u>
<br>
You don't need the parantheses are the hyphen, just simply type it in according to the previous fassion. Doing otherwise will screw up the next part.
<br>
<textarea name="death" wrap="virtual" rows="3" col="60">
</textarea>
<br>
<hr>
<br>
What is your most prized posession? <input type="text" name="posession">
<br>
<hr>
<center><input type="submit"></center>
<center><input type="reset"></center>
<hr>
</form>
</body>
</html>
Thanks to anybody that can help me out! [img]/images/graemlins/notworthy.gif[/img]
#!/usr/bin/perl
require "formprocessor.cgi";
&ReadParse(*input);
$name= $input{'name'};
$hate= $input{'hate'};
$form= $input{'form'};
$color= $input{'color'};
$election= $input{'election'};
$admire= $input{'admire'};
$death= $input{'death'};
$posession= $input{'posession'};
if ($form="plural")
{
pack of rabbid
}
if ($election="kerry")
{
Bush has won the election, and is now dominating the entire world.
}
if ($election="bush")
{
Kerry has won the election, and is now dominating the entire world. Even so, he still pulled the troops out of Iraq. Go figure.
}
print "Content-type: text/html\n\n";
print "<HTML><BODY>";
print "Here is your horoscope! Enjoy!";
print "Well first of all, $name, it seems as if my crystal ball is telling me that you will be consumed by a $color $hate.";
print "$election";
print "$admire has been kidnapped by aliens.";
print "You will meet your end very soon by $death";
print "Your $posession is now in a pawn shop in Florida. If you it is next to you, the moment you leave it, it will disappear.";
print "</BODY></HTML>";
--------------------------------------------------------
And here's the form that the above script processes:
<html>
<body>
<form method="post" action="http://rain.prohosting.com/jaredmg/horoscope.cgi">
<br>
<br>
<br>
<hr>
<pre>
What is your name? (First and Last) <input type="text" name="name">
</pre>
<br>
If there is one thing that you hate on this planet the most, what is it?<input type="text" name="hate">
<br>
Is that object that you mentioned in plural form or singular?
<br>
Singular<input type="radio" name="form" value="singular">
Plural<input type="radio" name="form" value="plural">
<br>
<hr>
<br>
<pre>
What is your favorite color? <select name="color">
<option value="red">red
<option value="orange">orange
<option value="yellow">yellow
<option value="green">green
<option value="blue">blue
<option value="purple">purple
<option value="brown">brown
<option value="black">black
<option value="pink">pink
</select>
</pre>
<br>
<hr>
<br>
Who do you want to win the election?
<br>
Bush<input type="radio" name="election" value="bush">
Kerry<input type="radio" name="election" value="kerry">
<br>
<hr>
<br>
Who in this world do you absolutely admire?<input type="text" name="admire">
<br>
<hr>
<br>
Describe in detail what kind of death you would hate the most, in this particulare format:
<br>
<u>Death by-(whatever it is)</u>
<br>
You don't need the parantheses are the hyphen, just simply type it in according to the previous fassion. Doing otherwise will screw up the next part.
<br>
<textarea name="death" wrap="virtual" rows="3" col="60">
</textarea>
<br>
<hr>
<br>
What is your most prized posession? <input type="text" name="posession">
<br>
<hr>
<center><input type="submit"></center>
<center><input type="reset"></center>
<hr>
</form>
</body>
</html>
Thanks to anybody that can help me out! [img]/images/graemlins/notworthy.gif[/img]
Comment