ArubiruRei Posted March 12, 2008 Share Posted March 12, 2008 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 https://forums.phpfreaks.com/topic/95877-end-parser-error-i-must-be-blind/ Share on other sites More sharing options...
BlueSkyIS Posted March 12, 2008 Share Posted March 12, 2008 semi-colon after your array definition? Link to comment https://forums.phpfreaks.com/topic/95877-end-parser-error-i-must-be-blind/#findComment-490851 Share on other sites More sharing options...
ArubiruRei Posted March 12, 2008 Author Share Posted March 12, 2008 Hm, good eye and thank you, but even with that I get the same error... Link to comment https://forums.phpfreaks.com/topic/95877-end-parser-error-i-must-be-blind/#findComment-490854 Share on other sites More sharing options...
BlueSkyIS Posted March 12, 2008 Share Posted March 12, 2008 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 https://forums.phpfreaks.com/topic/95877-end-parser-error-i-must-be-blind/#findComment-490856 Share on other sites More sharing options...
ArubiruRei Posted March 12, 2008 Author Share Posted March 12, 2008 Hm. Thank you. Link to comment https://forums.phpfreaks.com/topic/95877-end-parser-error-i-must-be-blind/#findComment-490857 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.