如何将 Madlib 答案传递到另一种形式上


How to pass Madlib Answers onto another form

我有一个我正在制作的 madlib。我有它,所以有许多不同的故事和类型。我已经完成了故事和单选按钮的设置,以更改底部的流派。http://web.art.fsu.edu/mundy/2013f_web2/janus/PHP%20Machine/scarystories.php这是我的网站。

我目前让页面将答案存储在隐藏字段中。通过单选按钮更改页面后如何传递此数据?

<!DOCTYPE html>
<html>
    <head>
        <title></title>
    <link href='http://fonts.googleapis.com/css?family=Gochi+Hand' rel='stylesheet' type='text/css'>
    <style TYPE="text/css">
    body{
        font-family: 'Gochi Hand',cursive;
        font-size: 17px;
        padding-bottom: 20px;
        background-image: url('WoodTextureBlood.png');
        background-repeat: repeat;
        }
    #paper{
    width: 70%;
    position: absolute;
    left: 50%;
    margin-left: -35%;
    padding: 20px;
    background-image: url('paperbg.png');
    border: 1px black solid;
    margin-bottom: 20px;
    }
    </style>
    </head>
    <body>
<div id="paper">    
<?php
//functions to load wordparts.php
include("wordparts.php");
$val = $_POST['noun1'];
$val = $_POST['noun2'];
$val = $_POST['noun3'];
$val = $_POST['noun4'];
$val = $_POST['noun5'];
$val = $_POST['noun6'];
$val = $_POST['noun7'];
$val = $_POST['noun8'];
$val = $_POST['noun9'];
$val = $_POST['noun10'];
$val = $_POST['noun11'];
$val = $_POST['verb1'];
$val = $_POST['verb2'];
$val = $_POST['verb3'];
$val = $_POST['verb4'];
$val = $_POST['verb5'];
$val = $_POST['adjective1'];
$val = $_POST['adjective2'];
$val = $_POST['adjective3'];
$val = $_POST['adjective4'];
$val = $_POST['location1'];
$val = $_POST['ptverb'];
$val = $_POST['adverb'];
//Stories
$story1 = ("$noun2 and $noun1 were driving through a wooded empty section of $location1. Lightning flashed, thunder roared, the sky went dark in the $adjective1 downpour. 
<br /> 
    <br /> 'We'd better $verb1,'  said $noun2. 
<br />
     <br /> $noun1 nodded his head in agreement. He stepped on the brake, and suddenly the car started to $verb2 on the slick pavement. They plunged off the road and slid to a halt at the bottom of an incline.
<br />
    <br /> Pale and shaking, $noun1 $adverb turned to check if $noun2 was all right.  When she nodded, $noun1 relaxed and looked through the rain soaked windows. 
<br />
    <br /> 'I'm going to see how bad it is,' he told $noun2, and went out into the storm. She $verb3 his blurry $noun3 in the headlight, walking around the front of the car. A moment later, he jumped in beside her, soaking wet. 
<br />
     <br /> 'The car's not badly damaged, but we're wheel-deep in mud,' he said. 'I'm going to have to go for help.'
<br />
     <br /> $noun2 swallowed nervously. There would be no quick rescue here. He told her to turn off the headlights and lock the doors until he returned. 
<br />
    <br /> $Noun6 Murder Hollow. Although $noun1 hadn't said the name aloud, they both knew what he had been thinking when he told her to lock the car.  This was the $noun4 where a $noun5 had once taken an $noun6 and hacked his wife to death in a jealous rage over an alleged affair. Supposedly, the $noun6-wielding spirit of the husband continued to haunt this section of the road.
<br />
     <br /> Outside the car, $noun2 heard a shriek, a $adjective2 thump, and a strange gurgling noise. But she couldn't see $noun7 in the darkness.
<br />
     <br /> Frightened, she $verb4 down into her seat. She $verb5 in silence for a while, and then she noticed another $noun7.  Bump. Bump. Bump.  It was a soft $noun7, like something being blown by the wind. 
<br />
     <br /> Suddenly, the car was $ptverb by a bright light.  An $adjective3 sounding voice told her to get out of the car. $noun1 must have found a police officer.  $noun2 unlocked the door and stepped out of the car.  As her $noun8 adjusted to the bright light, she saw it.
<br />
     <br /> Hanging by his feet from the $noun9 next to the car was the dead body of $noun1.  His bloody throat had been cut so deeply that he was nearly decapitated. The wind swung his corpse back and forth so that it thumped against the $noun9. Bump. Bump. Bump.
<br />
    <br /> $noun2 screamed and ran toward the voice and the light. As she drew close, she realized the light was not coming from a flashlight. Standing there was the glowing figure of a man with a smile on his face and a large, solid, and definitely real $noun6 in his hands. She backed away from the $adjective4 figure until she bumped into the $noun10.  
<br />
     <br /> 'Playing around when my back was turned,' the ghost whispered, stroking the sharp blade of the $noun6 with his $noun11. 'You've been very naughty.'
<br />
    <br />  The last thing she saw was the glint of the $noun6 in the eerie, incandescent light.");
$story2 = ("She lived deep in the $location1 in a tiny $noun1 and sold $noun2 for a living. Folks living in the town nearby called her Bloody Mary, and said she was a $noun3. None $ptverb cross the old crone for fear that their cows would go dry, their $noun4 rot away before winter, their children take sick of fever, or any number of $adjective1 things that an angry witch could do to her neighbors.
<br />
<br />Then the little $noun5 in the village began to $verb1, one by one. No one could find out where they had gone. Grief-stricken families searched the woods, the local buildings, and all the houses and barns, but there was no sign of the missing $noun5. A few brave souls even went to Bloody Mary's home in the woods to see if the witch had taken the $noun5, but she denied any knowledge of the disappearances. Still, it was noted that her $adjective2 appearance had changed. She looked younger, more attractive. The neighbors were suspicious, but they could find no proof that the witch had taken their young ones.
<br />
<br />Then came the night when the daughter of the miller rose from her bed and walked outside, following an enchanted $noun6 no one else could $verb2. The miller's wife had a toothache and was sitting up in the kitchen treating the tooth with an herbal remedy when her daughter left the house. She screamed for her husband and followed the girl out of the door. The miller came running in his nightshirt. Together, they tried to restrain the girl, but she kept breaking away from them and heading out of $noun7.
<br />
<br />The desperate cries of the miller and his wife woke the neighbors. They came to assist the frantic couple. Suddenly, a sharp-eyed farmer gave a shout and pointed towards a strange light at the edge of the woods. A few $noun8 followed him out into the field and saw Bloody Mary standing beside a large oak tree, holding a magic wand that was pointed towards the miller's house. She was glowing with an $adject3 light as she set her evil spell upon the miller's daughter.
<br />
<br />The townsmen grabbed their guns and their pitchforks and ran toward the witch. When she heard the commotion, Bloody Mary broke off her spell and fled back into the woods. The far-sighted farmer had loaded his gun with silver bullets in case the witch ever came after his daughter. Now he took aim and $verb3 at her. The bullet hit Bloody Mary in the $noun9 and she $verb4 to the ground. The angry townsmen leapt upon her and carried her back into the field, where they built a huge bonfire and burned her at the stake.
<br />
<br />As she burned, Bloody Mary screamed a $noun10 at the villagers. If anyone mentioned her name aloud before a mirror, she would send her spirit to revenge herself upon them for her terrible death. When she was dead, the villagers went to the $noun1 in the $location1 and found the unmarked graves of the little girls the evil witch had murdered. She had used their $noun11 to make her young again.
<br />
<br />From that day to this, anyone $adjective4 enough to chant Bloody Mary's name three times before a darkened mirror will summon the vengeful spirit of the witch. It is said that she will $verb5 their bodies to pieces and rip their souls from their mutilated bodies. The souls of these unfortunate ones will burn in torment as Bloody Mary once was burned, and they will be trapped forever in the mirror.");
$story3 = ("Mad Henry was a $noun1 who lived alone in a decrepit $noun2 at the edge of town.  Rumors were rife about the wild-eyed $noun3.  Some folks said that he was a $noun4 who called upon the powers of darkness to $verb1 his neighbors.  Others called him a mad doctor who could restore life to foul corpses from the local cemetery.  No $adjective1 $noun5 in town had anything to do with Mad Henry
<br /> 
<br />Then one year a new $noun6 moved to town with a $adjective2 daughter, $noun7, who caught Mad Henry's eye. He showered the maiden with gifts-goblets of pure gold, necklaces of pearl, and a pot of daisies that never dropped a single petal. Despite the $noun9, $noun7 fell in love with another, Geoffrey, a handsome young man just home from university. A week after meeting they $ptverb, leaving behind a stunned Mad Henry. 
<br />
<br />When $noun7 and Geoffrey returned from the elopement, they $verb2 a big ball and invited everyone in town. While $noun7 was waltzing with her father, she heard a clap of thunder. Lightning flashed $adverb again and again. Suddenly, the double doors blew open and a breeze whirled in, bringing with it the smell of $adjective3,dead, decaying things. Mad Henry loomed in the doorway, pupils gleaming red with anger. He was followed by the grotesque $noun8 of the dead, who came marching two by two into the room. Their eye sockets glowed with blue fire as they surrounded the room.
Two of the corpses captured Geoffrey and threw him down at the feet of their $noun9. Red eyes gleaming, Mad Henry drew a silver-bladed knife and casually cut the groom's throat from ear to ear. $noun7 screamed and $verb3(ed) forward, pushing through the foul, stinking corpses of the dead, and flung herself upon her dying husband. 
 <br /><br />
'$Verb4 us both,' she cried desperately. 
<br /><br />
But Mad Henry  plucked the $noun7 out of the pool of $noun10 surrounding her dead husband and carried her out into the thundering night. Behind him, the army of the dead turned from the grizzly scene and followed their $noun9. The sounds of thunder and lightning faded away as the alchemist and his dead companions disappeared into the dark night. 
 <br /><br />
Geoffrey's father and $noun7's father gathered a small mob and followed the evil hermit, intent upon saving $noun7.  When they searched Mad Henry's house, they found it completely empty except for a light, which shone from a series of mysterious, $adjective4 globes that bobbed near the ceiling of each room. Mad Henry had vanished. 
 <br /><br />
Search parties scoured the $location1 for days, but turned up nothing. Geoffrey was buried in the local cemetery, and the dance hall was torn down. No one in town spoke about what had happened, and no one dared imagine what had become of poor $noun7. 
<br /><br />
A year to the day after the ball, a timid knock sounded upon the door of $noun7's parents' home. When her father opened it, he saw a gaunt, gray figure on the stoop. Her eyes were dull with exhaustion and pain. It was $noun7! Her tongue had been cut out so she couldn't $verb5.  But when she produced a knife from her tattered garments-the knife with a silver blade that they had last seen in the hands of Mad Henry- the gleam of satisfaction in $noun7's eyes told them that the streaks of blood that coated the knife were those of Mad Henry. That night, $noun7 died in her sleep with a peaceful smile upon her ravaged $noun11. ");
$story4 = ("The $noun1 was raging $adverb around them as the brothers stumbled down the long $noun2.  They were miles from any $location1, and knew they had to seek shelter or $verb1 to $noun3.  So it was with  gratitude that the two brothers spotted a saloon and pushed their way through the door.  
<br /><br />Every eye in the room turned upon them, as the boys ordered coffee with the last of their money. As the $noun4 went to fetch the hot $noun5, most of the regulars returned to their conversations.  But one $noun6 continued to stare;  a massive $noun6 with a mop of red hair and a long red beard who was the worse for a drink.
<br /><br />
'You're looking at me funny,' the $noun6 slurred, looming over the two boys.
<br /><br />
'We weren't looking at you,' said the older boy. 'We were just warming ourselves by the $noun7.'
<br /><br />
'Are you calling me a $noun8?' he shouted. Around the room crowd grinned; they loved a good fight. 
<br /><br />
 'We didn't say that,' said the older boy quickly, waving his $noun9 and accidentally striking the butcher on the arm. That did it. The butcher grabbed the boy by the collar. 'No one $verb2 me and gets away with it,' he roared and threw the boy headfirst into the huge fire raging in the hearth. 
<br /><br />There was a moment of stunned silence in the saloon, and then the elder boy screamed in agony as the flames engulfed him from head to toe. The younger lad shouted in terror. The older boy stumbled out of the fireplace, as the little brother tried to $verb3 the fire with his small hands.
<br /><br />The butcher loomed above them, grinning sadistically as the flaming boy lost consciousness, his screams dying away.
<br /><br />
'Your turn,' the butcher said to his brother. The younger boy gasped in fear and $ptverb for his life out into the raging snow. The boy's $adjective1 frozen body was not found until the spring.
`enter code here`<br /><br />
One evening, a decade after the death of the two young boys, a $adjective2 man with a long red beard $verb4 down the road one taken by the brothers. The butcher had heard rumors of a ghost but had discarded them as so much poppycock and $noun10 talk.
<br /><br />
As he meandered down the road, he became aware that a silence had fallen. In the odd silence, he heard the footsteps of a large animal. They walked when he walked and stopped when he stopped. Pulse pounding madly, the butcher turned. Behind him, large as an $noun11, stood a black dog with blazing blue eyes and $adjective3 teeth. The butcher had seen those blue eyes once before, gazing at him from the face of a young boy trying to save his burning brother.
<br /><br />
The black dog growled softly and took a step forward. The butcher $verb5 around to flee and found himself face to face with tall figure covered from head to toe in flames. The burning boy reached out toward the butcher with hands withered and blackened by fire. The butcher gave a terrified, $adjective4 scream and fell, blood gushing from eyes and nose. He was dead before he hit the ground.  
<br /><br />
      To this day, the black dog and the flaming figure still appeared in that vicinity to harass travelers and speed them on their way.");
?>
<!--Stores Data-->
<form method="post">
<input  type="hidden" name="noun1" value="<?php echo $noun1 ?>">
<input  type="hidden" name="noun2" value="<?php echo $noun2 ?>">
<input  type="hidden" name="noun3" value="<?php echo $noun3 ?>">
<input  type="hidden" name="noun4" value="<?php echo $noun4 ?>">
<input  type="hidden" name="noun5" value="<?php echo $noun5 ?>">
<input  type="hidden" name="noun6" value="<?php echo $noun6 ?>">
<input  type="hidden" name="noun7" value="<?php echo $noun7 ?>">
<input  type="hidden" name="noun8" value="<?php echo $noun8 ?>">
<input  type="hidden" name="noun9" value="<?php echo $noun9 ?>">
<input  type="hidden" name="noun10" value="<?php echo $noun10 ?>">
<input  type="hidden" name="noun11" value="<?php echo $noun11 ?>">
<!--Verbs-->
<input  type="hidden" name="verb1" value="<?php echo $verb1 ?>">
<input  type="hidden" name="verb2" value="<?php echo $verb2 ?>">
<input  type="hidden" name="verb3" value="<?php echo $verb3 ?>">
<input  type="hidden" name="verb4" value="<?php echo $verb4 ?>">
<input  type="hidden" name="verb5" value="<?php echo $verb5 ?>">
<!--Extras-->
<input  type="hidden" name="adjective1" value="<?php echo $adjective1 ?>">
<input  type="hidden" name="adjective2" value="<?php echo $adjective2 ?>">
<input  type="hidden" name="adjective3" value="<?php echo $adjective3 ?>">
<input  type="hidden" name="adjective4" value="<?php echo $adjective4 ?>">
<input  type="hidden" name="ptverb" value="<?php echo $ptverb ?>">
<input  type="hidden" name="adverb" value="<?php echo $adverb?>">
<input  type="hidden" name="adverb" value="<?php echo $location1?>">
</form>
<?php
//Random Story code
$stories = array($story1,$story2,$story3, $story4);
echo $stories[array_rand($stories)];
 ?>
<br />
<br /> <b>Please choose one of the following options below to change the style of story: </b> 
<br /><input type="radio" name="option" value="search" onclick="document.location.href='classicalstories.php'"/> Classical Stories 
<input type="radio" name="option" value="open database" onclick="document.location.href='ebonicsstories.php'" /> Sassy Romantic Stories
<input type="radio" name="option" value="open database" onclick="document.location.href='scarystories.php'" /> Scary Stories
<br />
</div>
    </body>
</html>
有很多

方法可以做到这一点,如果你认为它就像一个向导。

您可以通过以下方式执行此操作

  • 在 URL 中传递参数并在下一页访问它

  • 将其写入饼干并在下一页阅读

  • 如果存在,请将其保存在会话中并在下一页上阅读

  • 甚至您可以将这些参数保存到文件或数据库中并从那里读取它们(很少使用,不好)

这里有一个很好的答案PHP 将变量传递到下一页