Jump to content

$end parser error (i must be blind)


ArubiruRei

Recommended Posts

I know this means that I have missed a closing tag somewhere, but I've been looking for it for the past umpteen hours straight and can't find it... i've got to be blind....

 

I am a very beginner php programmer and was exercising my skills with this little program:

 

<html><head><title>Seven Minutes in Heaven: the Online Version!</title></head>


<script type="text/css">
</script>

<?php
function Straight_Love($Me, $You){
         echo "<p>$Me and $You make sweet straight love.</p>";}
function Not_Compatable($Me, $You){
         echo "<p>$Me and $You are not sexually compatable. They talk in the bedroom.</p>";}
function Gay_Love($Me, $You){
         echo "<p>$Me and $You make sweet yaoi love! Otaku girls videotape it.</p>";}
function Lez_Love($Me, $You){
         echo "<p>$Me and $You make sweet yuri love! Otaku boys videotape it.</p>";}
function Any_Love($Me, $You){
         echo "<p> $Me and $You make sweet love.</p>";}

$people = array(  array(
                         'name' => "John",
                         'SO' => "Straight",
                         'Gender' => "M"),
                  array(
                         'name' => "Matt",
                         'SO' => "Gay",
                         'Gender' => "M"),
                  array(
                         'name' => "Anton",
                         'SO' => "Bi",
                         'Gender' => "M"),
                  array(
                         'name' => "Rei",
                         'SO' => "Straight",
                         'Gender' => "F"),
                  array(
                         'name' => "Lola",
                         'SO' => "Lesbian",
                         'Gender' => "F"),
                  array(
                         'name' => "Shea",
                         'SO' => "Bi",
                         'Gender' => "F"),
)  
?>

<body>
<div id="header">
<h1>Seven Minutes in Heaven</h1>
</div> <!-- end header-->

<div id="main">
<h3>Introduction:</h3>
<p>You are hosting a party, and your attendees have voted to play the game "Seven Minutes in Heaven", expect with your parent's bedroom instead of a closet. So, of course, fucking will ensue.</p>
<h3>People:</h3>
<p>At your party are John (who is straight), Matt (who is gay), Anton (who is bi), Lola (who is a lesbian), Rei (who is straight), and Shea (who is Bi).</p>
</div> <!-- end main-->

<form>
<input type="button" name="Start" value="Click me to send two random friends into the bedroom!" onclick="

<?php

Shuffle($people);

If ($people[0][sO] == "Straight" && $people[1][sO] == "Straight"){
         If ($people[0][Gender] != $people[1][Gender]){
                    Straight_Love($people[0][name], $people[1][name]);}
         else{    
                    Not_Compatable($people[0][name], $people[1][name]);}
}

If ($people[0][sO] == "Gay" && $people[0][sO] == "Gay"){
         Gay_Love($people[0][name], $people[1][name]);
}


If ($people[0][sO] == "Lesbian" && $people[0][sO]== "Lesbian"){
         Lez_Love($people[0][name], $people[1][name]);
}


If ($people[0][sO] == "Bi" || $people[1][sO] == "Bi"){

        If ($people[0][s0] == $people[1][sO]){
                           Any_Love($people[0][name], $people[1][name]);}

        If ($people[0][sO] == "Gay" || $people[1][sO] == "Gay"){
                           If ($people[0][Gender] == $people[1][Gender]){
                                Gay_Love($people[0][name], $people[1][name]);}
                           else {Not_Compatable($people[0][name], $people[1][name]);}

        If ($people[0][sO] == "Lesbian" || $people[1][sO] == "Lesbian"){
                           If ($people[0][Gender] == $people[1][Gender]){
                                Lez_Love($people[0][name], $people[1][name]);}
                           else {Not_Compatable($people[0][name], $people[1][name]);}

        If ($people[0][sO] == "Straight" || $people[1][sO] == "Straight"){
                           If ($people[0][Gender] != $people[1][Gender]){
                                Straight_Love($people[0][name], $people[1][name]);}
                           else {Not_Compatable($people[0][name], $people[1][name]);}
}

?>
"
/>

</form>                    
</body>
</html>

Link to comment
Share on other sites

several mistakes. i don't know if it will do what you want, but no more unexpected end.

 

<html><head><title>Seven Minutes in Heaven: the Online Version!</title></head>


<script type="text/css">
</script>

<?php
function Straight_Love($Me, $You) {
        echo "<p>$Me and $You make sweet straight love.</p>";
}
function Not_Compatable($Me, $You) {
        echo "<p>$Me and $You are not sexually compatable. They talk in the bedroom.</p>";
}
function Gay_Love($Me, $You) {
        echo "<p>$Me and $You make sweet yaoi love! Otaku girls videotape it.</p>";
}
function Lez_Love($Me, $You) {
        echo "<p>$Me and $You make sweet yuri love! Otaku boys videotape it.</p>";
}
function Any_Love($Me, $You) {
        echo "<p> $Me and $You make sweet love.</p>";
}

$people = array( 
array('name' => "John",
	'SO' => "Straight",
	'Gender' => "M"),
array('name' => "Matt",
	'SO' => "Gay",
	'Gender' => "M"),
array('name' => "Anton",
	'SO' => "Bi",
	'Gender' => "M"),
array('name' => "Rei",
	'SO' => "Straight",
	'Gender' => "F"),
array('name' => "Lola",
	'SO' => "Lesbian",
	'Gender' => "F"),
array('name' => "Shea",
	'SO' => "Bi",
	'Gender' => "F")
);
?>

<body>
<div id="header">
<h1>Seven Minutes in Heaven</h1>
</div> <!-- end header-->

<div id="main">
<h3>Introduction:</h3>
<p>You are hosting a party, and your attendees have voted to play the game "Seven Minutes in Heaven", expect with your parent's bedroom instead of a closet. So, of course, fucking will ensue.</p>
<h3>People:</h3>
<p>At your party are John (who is straight), Matt (who is gay), Anton (who is bi), Lola (who is a lesbian), Rei (who is straight), and Shea (who is Bi).</p>
</div> <!-- end main-->

<form>
<input type="button" name="Start" value="Click me to send two random friends into the bedroom!" onclick="">

<?php

Shuffle($people);

If ($people[0][sO] == "Straight" && $people[1][sO] == "Straight") {
        If ($people[0][Gender] != $people[1][Gender]){
                   Straight_Love($people[0][name], $people[1][name]);}
        else{    
                   Not_Compatable($people[0][name], $people[1][name]);}
}

If ($people[0][sO] == "Gay" && $people[0][sO] == "Gay"){
        Gay_Love($people[0][name], $people[1][name]);
}


If ($people[0][sO] == "Lesbian" && $people[0][sO]== "Lesbian"){
        Lez_Love($people[0][name], $people[1][name]);
}


If ($people[0][sO] == "Bi" || $people[1][sO] == "Bi"){

       If ($people[0][s0] == $people[1][sO]){
                          Any_Love($people[0][name], $people[1][name]);}

       If ($people[0][sO] == "Gay" || $people[1][sO] == "Gay"){
                          If ($people[0][Gender] == $people[1][Gender]){
                               Gay_Love($people[0][name], $people[1][name]);}
                          else {Not_Compatable($people[0][name], $people[1][name]);}

       If ($people[0][sO] == "Lesbian" || $people[1][sO] == "Lesbian"){
                          If ($people[0][Gender] == $people[1][Gender]){
                               Lez_Love($people[0][name], $people[1][name]);}
                          else {Not_Compatable($people[0][name], $people[1][name]);}

       If ($people[0][sO] == "Straight" || $people[1][sO] == "Straight"){
                          If ($people[0][Gender] != $people[1][Gender]){
                               Straight_Love($people[0][name], $people[1][name]);}
                          else {Not_Compatable($people[0][name], $people[1][name]);}
}}}}

?>


</form>                    
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.