Discussion Forum

Help with MTG webpage

For a school IPT assignment, we have to make browser based game using our incredibly small knowledge or html and php, with CSS soon to be added. Always the egotist, i decided to do a MTG game, 1v1 hotseat. Each player enters a username, then selects a deck. The decks are selected on separate pages, and this is where i need help. When i click submit on the first deck select, the second deck select will not load. I have no idea why. could someone please have a look at my code and tell me where I went wrong (aside from wanting to do a hotseat MTG game.)

First deck select:
$name1= $_POST[name1];
$name2= $_POST[name2];
?>



<?php <br/ >printf("%s, choose your deck!\n", $name1); <br/ >?> <br/ >



printf("Welcome %s and %s, to the MTG 1v1 room!
\n", $name1,$name2);
printf("%s, select a deck from the list below.
\n", $name1);
?>




Jace Beleren

Ajani Goldmane

Liliana Vess

Garruk Wildspeaker

Chandra Nalaar















Second deck select:
$deck= $_POST[deck]
$name1= $_POST[name1];
$name2= $_POST[name2];
?>



<?php <br/ >prinf("%s, choose your deck!\n", $name2); <br/ >?> <br/ ></head> <br/ ><body bgcolor="blue"> <br/ ><font color="black" size="5" face="times new roman"> <br/ ><?php <br/ >prinf("%s, it is now time to choose your deck from the list below.<br>/n", $name2); <br/ >?> <br/ ><form name="decks" method="post" action="Battlefield.php"><br> <br/ ><U>Jace Beleren <img src="blue mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck.1"><br> <br/ ><U>Ajani Goldmane <img src="white mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck.2"><br> <br/ ><U>Liliana Vess <img src="black mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck.3"><br> <br/ ><U>Garruk Wildspeaker <img src="green mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck.4"><br> <br/ ><U>Chandra Nalaar <img src="red mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck.5"><br> <br/ ><input name="submit" type="submit" value="Begin the Duel!"> <br/ ><input name="name1" type="text" style="display:none" value="$name1"> <br/ ><input name="name2" type="text" style="display:none" value="$name2"> <br/ ></form> <br/ ><br> <br/ ><br> <br/ ><img src="Jace Beleren.jpg"> <br/ ></body> <br/ ></html> <br/ > <br/ >Thanks to all who read all the code.</div><div class="user-profile-card"><img src="//www.gravatar.com/avatar/ab51cd66f43d2f950c9bfc35e619211f?s=25" /><div class="user-info-container"><a href="/nightcreeper58/">nightcreeper58</a> <span class="user-comment-count">53 posts</span></div><div class="clear"></div></div><div class="clear"></div><span class="comment-date">Posted 25 July 2011 at 08:26</span><span class="comment-date" style="margin-left: 5px; font-weight: 700;"></span><p class="comment-tools"><a href="/forum/thread.aspx?ftid=5089">Permalink</a></p> </div> <div class="clear"></div> <div class="heading heading-920" style="float: left; margin-top: 30px;"> <h2>7 replies</h2> <a class="show-modal-login join-link" href="#">Login to post a comment </a> </div> <div class="comment-feed-container"> <a name="first-comment"></a> <a name="26910"></a><div id="26910" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/8fdc225e3070ef159ce327fe2003c568?size=25" /><div class="user-info-container 5123"><a href="/setherial/">Setherial</a> <span class="user-comment-count">349 posts</span></div></div><div class="clear"></div><div class="comment">is the filename of the second page Deck_Select2.php? Linux servers are case sensitive, using a capital in your filename is not very good practise. I'm not a php developer so thats the only thing that stands out to me.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 25 July 2011 at 09:00</span><p class="comment-tools"><a href="#26910">Permalink</a></p></div> <a name="26914"></a><div id="26914" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/ab51cd66f43d2f950c9bfc35e619211f?size=25" /><div class="user-info-container 43167"><a href="/nightcreeper58/">nightcreeper58</a> <span class="user-comment-count">53 posts</span></div></div><div class="clear"></div><div class="comment">all the file names are correct (should've posted that originally) which is why I posted this in the first place. Thanks anyway Seth.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 25 July 2011 at 10:58</span><p class="comment-tools"><a href="#26914">Permalink</a></p></div> <a name="26918"></a><div id="26918" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/8fdc225e3070ef159ce327fe2003c568?size=25" /><div class="user-info-container 5123"><a href="/setherial/">Setherial</a> <span class="user-comment-count">349 posts</span></div></div><div class="clear"></div><div class="comment">have you tried reducing the code to just the form + submit button. <br/ ><br/ >something like this should work<br/ ><br/ ><html><br/ ><body><br/ ><br/ ><form action=""Deck_Select2.php" method="post"><br/ ><input type="submit" /><br/ ></form><br/ ><br/ ></body><br/ ></html><br/ ><br/ >And if it doesn't it probably means he can't find the file.<br/ ><br/ >If this works simple start adding stuff and test part by part.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 25 July 2011 at 12:10</span><p class="comment-tools"><a href="#26918">Permalink</a></p></div> <a name="26970"></a><div id="26970" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/ab51cd66f43d2f950c9bfc35e619211f?size=25" /><div class="user-info-container 43167"><a href="/nightcreeper58/">nightcreeper58</a> <span class="user-comment-count">53 posts</span></div></div><div class="clear"></div><div class="comment">I tried that Seth, and it didn't work. Thanks heeps for that. I'll try creating a new file with a new name and see if that works.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 25 July 2011 at 23:52</span><p class="comment-tools"><a href="#26970">Permalink</a></p></div> <a name="27028"></a><div id="27028" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/ab51cd66f43d2f950c9bfc35e619211f?size=25" /><div class="user-info-container 43167"><a href="/nightcreeper58/">nightcreeper58</a> <span class="user-comment-count">53 posts</span></div></div><div class="clear"></div><div class="comment">ok, i remade and renamed the file with this code: <br/ ><?php <br/ > $deck= $_POST[deck] <br/ > $name1= $_POST[name1] <br/ > $name2= $_POST[name2] <br/ >?> <br/ > <br/ ><html> <br/ ><head> <br/ ><title><?php <br/ >printf("%s, choose your deck\n", $name2); <br/ >?> <br/ ></title> <br/ ></head> <br/ ><body bgcolor="blue"> <br/ ><font color="white" size="5" face="arial"> <br/ ><?php <br/ >printf("%s, choose a deck from the list below. The game will begin when you click the duel! button.\n", $name2); <br/ >?> <br/ ><form name="decks2" method="post" action="Battlefield.php"><br> <br/ ><U>Jace Beleren <img src="blue mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck_1"><br> <br/ ><U>Ajani Goldmane <img src="white mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck_2"><br> <br/ ><U>Liliana Vess <img src="black mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck_3"><br> <br/ ><U>Garruk Wildspeaker <img src="green mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck_4"><br> <br/ ><U>Chandra Nalaar <img src="red mana.jpg" width="30"></U><input name="deck2" type="radio" value="deck_5"><br> <br/ ><input name="name1" type="text" style="display:none" value="$name1"> <br/ ><input name="name2" type="text" style="display:none" value="$name2"> <br/ ><br> <br/ ><br> <br/ ><input name="submit" type="submit" value="Duel!"> <br/ ></form> <br/ ><br> <br/ ><br> <br/ ><br> <br/ ><img src="Jace Beleren.jpg"> <br/ ></body> <br/ ></html> <br/ > <br/ >When i click the submit button the previous page, it comes up with a HTTP 500 internal server error. If anyone with any sort of programming knowledge has read this, please help. :(</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 27 July 2011 at 00:37</span><p class="comment-tools"><a href="#27028">Permalink</a></p></div> <a name="27035"></a><div id="27035" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/8fdc225e3070ef159ce327fe2003c568?size=25" /><div class="user-info-container 5123"><a href="/setherial/">Setherial</a> <span class="user-comment-count">349 posts</span></div></div><div class="clear"></div><div class="comment">Who is the owner of the server you are running this on? You'll have to ask him to check his logs to get more info about the error. an HTTP 500 error is not a specific error, it can be anything.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 27 July 2011 at 06:44</span><p class="comment-tools"><a href="#27035">Permalink</a></p></div> <a name="27465"></a><div id="27465" class="container-left container-920 comment-container"><div style="float: left; display: inline; width: 770px;"><div class="user-profile-card"><img src="//www.gravatar.com/avatar/ab51cd66f43d2f950c9bfc35e619211f?size=25" /><div class="user-info-container 43167"><a href="/nightcreeper58/">nightcreeper58</a> <span class="user-comment-count">53 posts</span></div></div><div class="clear"></div><div class="comment">its ok, it turns out i was missing a few semi-colons at the end of my php statements.</div></div><div class="comment-vote-container"><img class="show-modal-login" src="/images/generic/vote-up-small.png" /><span>0</span><img class="show-modal-login" src="/images/generic/vote-down-small.png" /></div><div class="clear"></div><span class="comment-date">Posted 06 August 2011 at 08:03</span><p class="comment-tools"><a href="#27465">Permalink</a></p></div> <a id="reply"></a> </div> <div class="clear"></div> </div> <!-- End Repeating Parchment --> <footer class="parchment-footer"> </footer> </div> <!-- End Parchment --> <!-- Start Footer --> <footer> <div id="footer"> <nav id="footer-nav"> <ul> <li>© Copyright 2005-2024 v3</li> <li><a href="/support/">Support MTG Vault</a></li> <li><a href="/faq/">FAQ</a></li> <li><a href="/forum/category.aspx?fn=mtg-vault-bugs-suggestions">Report a Bug</a></li> <li><a href="https://www.facebook.com/mtgvault/">Facebook</a></li> <li><a href="/privacy/">Privacy & Cookies</a></li> <li><u><a id='unic-gdpr' onclick='__tcfapi("openunic");return false;' style='display:none;cursor:pointer;'>Change Ad Consent</a> <a id='unic-ccpa' onclick="window.__uspapi('openunic')" style='display:none;cursor:pointer;'>Do not sell my data</a></u></li> </ul> </nav> <aside id="poweredby"> <p>Powered by the Vault Network</p> </aside> <div class="clear"></div> <div class="squares-container"> <!-- /8095840/.2_A.33734.3_mtgvault.com_tier1 --> <div id='div-gpt-ad-1517816722572-5' style='height: 90px; width: 728px;'> <script> googletag.cmd.push(function () { googletag.display('div-gpt-ad-1517816722572-5'); }); </script> </div> <span class='bt-uid-tg' data-uid='5cb88c33eb-228' style='display: none !important'></span> </div> </div> </footer> <!-- End Footer --> <br /> <div id="modal-login" style="color: #FFF; display: none;"> <div id="ctl00_Login1_Panel_LoginForm" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_Login1_ImageButton_Login')"> <img src="/images/logo/mtg-vault-login.png" width="153" height="40" alt="Login to Vault" /><br /> <br /> <label for="username">Username:</label> <input name="ctl00$Login1$TextBox_Username" type="text" id="ctl00_Login1_TextBox_Username" class="textbox" name="username" /> <div class="clear" style="height: 10px;"></div> <label for="password">Password:</label> <input name="ctl00$Login1$TextBox_Password" type="password" id="ctl00_Login1_TextBox_Password" class="textbox" name="password" /> <div class="clear" style="height: 10px;"></div> <span class="remember-me"><input id="ctl00_Login1_CheckBox_RememberMe" type="checkbox" name="ctl00$Login1$CheckBox_RememberMe" /><label for="ctl00_Login1_CheckBox_RememberMe">Remember Me</label></span><input type="image" name="ctl00$Login1$ImageButton_Login" id="ctl00_Login1_ImageButton_Login" class="login-button" src="/images/buttons/login.png" style="border-width:0px;" /> <div class="clear"></div> <span class="info"><a class="link" href="/forgot-password.aspx">Forgot your password</a>?</span><br /> <span class="info">Don't have an account yet? <span class="link hide-login-show-signup">Register now</span>!</span> </div> </div> </div> <div id="dropdown-notifications" class="dropdown dropdown-tip dropdown-anchor-right"> <ul class="dropdown-menu"> <li><span>No notifications!</span></li> </ul> </div> <script type="text/javascript"> //<![CDATA[ var theForm = document.forms['aspnetForm']; if (!theForm) { theForm = document.aspnetForm; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //]]> </script> <script src="/WebResource.axd?d=22y61A4fMC4SVUSKx5PPRaLFtMXlEPsZGSH2UVr1RJtz-_TKdjJdaHhbED-I5St27qSMw40juAFRbTfDsVVqZ-K1asqWsUyOG9pYS7tfBW81&t=637321953357241717" type="text/javascript"></script> </form> </body> </html>