Jump to content

purge08

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by purge08

  1. A couple other things i found where $_post were used in php script As easily as a user can monkey with GET data in a URL, the same thing can be done with POST data. You should always assume that the user can submit whatever form and form data that they want to, and process the data accordingly. Don’t trust user input, whether it’s from GET or from POST! Post data is accessed with the $_POST array in PHP. <?php echo("First name: " . $_POST['firstname'] . "<br />\n"); echo("Last name: " . $_POST['lastname'] . "<br />\n"); ?> <form action="myform5.php" method="post"> <p>First name: <input type="text" name="firstname" /></p> <p>Last name: <input type="text" name="firstname" /></p> <input type="submit" name="submit" value="Submit" /> </form>
  2. I meant us to the link above that one of the posters posted. Also what do you mean by two openings? I only see one PHP open and one PHP close tag?
  3. The php link they gave me post and get variables with the $like that
  4. I'm using udemy to learn but trying to figure out how echo get or post works in at least one of the fields to show up on index.php
  5. <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Deck Master</title> <style media="screen"> body { background-color:#f0f0f0; } #input-holder { padding:20px; border:1px solid #999; border-radius:10px; background-color:#fff; box-shadow:inset 0 0 20px #999, 3px 3px 3px #999; overflow:hidden; text-align:center; } #left-input{ float:left; overflow:hidden; } #right-input{ float:right; overflow:hidden; } #center-input{ display:inline-block; } .qty,.pht { float:left; } .qty { margin-right:10px; } .qty input { display:block; width:24px; margin-top:10px; } .pht input { display:block; width:130px; margin-top:10px; } @media screen and (max-width:650px) { #left-input,#right-input,#center-input{ float:none; display:block; margin:0 auto 10px; text-align:center; } .qty,.pht { float:none; display:inline-block; } } </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body background="background.jpg"><form action="index.php" method="post"> <input type="hidden" name="Name" value="deckeditor"> <table border="0" width="100%"> <tr> <td valign="top" align="Center"> <h1> <font color="white">Deck Editor <small>(60 cards)</small></h1> <body> <form> <div id="input-holder"> <div id="left-input"> <font color="black"> <label class="qty">Qty <input type="text" name="qty1" placeholder=""> </label> <label class="pht">Card Name <input type="text" name="card1" placeholder=""> </div> <div id="right-input"> <font color="black"><label class="qty">Qty <input type="text" name="qty2" placeholder=""> </label> <label class="pht">Card Name <input type="text" name="card2" placeholder=""> </label> </div> <div id="center-input"> <font color="black"><label class="qty">Qty <input type="text" name="qty3" placeholder=""> </label> <label class="pht">Card Name <input type="text" name="card3" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty4" placeholder=""> </label> <label class="pht"> <input type="text" name="card4" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty5" placeholder=""> </label> <label class="pht"> <input type="text" name="card5" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty6" placeholder=""> </label> <label class="pht"> <input type="text" name="card6" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty7" placeholder=""> </label> <label class="pht"> <input type="text" name="card7" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty8" placeholder=""> </label> <label class="pht"> <input type="text" name="card8" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty9" placeholder=""> </label> <label class="pht"> <input type="text" name="card9" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty10" placeholder=""> </label> <label class="pht"> <input type="text" name="card10" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty11" placeholder=""> </label> <label class="pht"> <input type="text" name="card11" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty12" placeholder=""> </label> <label class="pht"> <input type="text" name="card12" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty13" placeholder=""> </label> <label class="pht"> <input type="text" name="card13" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty14" placeholder=""> </label> <label class="pht"> <input type="text" name="card14" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty15" placeholder=""> </label> <label class="pht"> <input type="text" name="card15" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty16" placeholder=""> </label> <label class="pht"> <input type="text" name="card16" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty17" placeholder=""> </label> <label class="pht"> <input type="text" name="card17" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty18" placeholder=""> </label> <label class="pht"> <input type="text" name="card18" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty19" placeholder=""> </label> <label class="pht"> <input type="text" name="card19" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty20" placeholder=""> </label> <label class="pht"> <input type="text" name="card20" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty21" placeholder=""> </label> <label class="pht"> <input type="text" name="card21" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty22" placeholder=""> </label> <label class="pht"> <input type="text" name="card22" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty23" placeholder=""> </label> <label class="pht"> <input type="text" name="card23" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty24" placeholder=""> </label> <label class="pht"> <input type="text" name="card24" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty25" placeholder=""> </label> <label class="pht"> <input type="text" name="card25" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty26" placeholder=""> </label> <label class="pht"> <input type="text" name="card26" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty27" placeholder=""> </label> <label class="pht"> <input type="text" name="card27" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" name="qty28" placeholder=""> </label> <label class="pht"> <input type="text" name="card28" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" name="qty29" placeholder=""> </label> <label class="pht"> <input type="text" name="card29" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" name="qty30" placeholder=""> </label> <label class="pht"> <input type="text" name="card30" placeholder=""> </label> </div> </div> <input type="submit" value="Submit deck" </table> </body> </form> </html> Re-edited code. The form does go to the index.php when i hit submit, and tried to use $get or $post to see if the entered data on the html would post and nothing showed up on the index.php. is there something wrong or that i am missing on how to get it to show up? <?php $_get['qty1'] $_get['card1'] echo ($_post[qty2]); echo ($_post[qty3]); echo ($_post[qty4]); echo ($_post[qty5]); echo ($_post[qty6]); echo ($_post[qty7]); echo ($_post[qty8]); echo ($_post[qty9]); echo ($_post[qty10]); echo ($_post[qty11]); echo ($_post[qty12]); echo ($_post[qty13]); echo ($_post[qty14]); echo ($_post[qty15]); echo ($_post[qty16]); echo ($_post[qty17]); echo ($_post[qty18]); echo ($_post[qty19]); echo ($_post[qty20]); echo ($_post[qty21]); echo ($_post[qty22]); echo ($_post[qty23]); echo ($_post[qty24]); echo ($_post[qty25]); echo ($_post[qty26]); echo ($_post[qty27]); echo ($_post[qty28]); echo ($_post[qty29]); echo ($_post[qty30]); ?>
  6. I will be using an Api for the card names and images, I just want to figure out how to get the html form I made to output using php as a test run before I have it imprint into the users blog. That is why I am starting with variables and seeing if that will post the $qty and $card in the above php script.
  7. I have a html form that allows the user to enter the qty and card names. I am trying to figure out variables to output what the user typed in htm form to output into like a process.php or something as I am just learning variables and testing to get it to show up. That is why I had black lotus and qty of 4 in the php code to see if I can get it to show up such as the example of having it say hello world but instead be that of what the user filled out on the form.
  8. The one html form has 30 qty and 30 card name placeholders. Another one of the same type will have 100 qty and 100 name placeholders, so what I am trying to do is process what the user enters and output it as such. 24 LANDS 4 Llanowar Wastes 4 Mana Confluence 4 Sandsteppe Citadel 3 Windswept Heath 2 Caves of Koilos 2 Forest 2 Temple of Silence 1 Urborg, Tomb of Yawgmoth 1 Plains 1 Temple of Plenty 26 CREATURES 4 Anafenza, the Foremost 4 Warden of the First Tree 4 Siege Rhino 4 Rakshasa Deathdealer 4 Fleecemane Lion 3 Brimaz, King of Oreskos 2 Herald of Torment 1 Surrak, the Hunt Caller 10 INSTANTS and SORC. 4 Dromoka's Command 3 Ultimate Price 3 Valorous Stance SIDEBOARD 1 Ultimate Price 1 Valorous Stance 1 Herald of Torment 1 Gods Willing 1 Tasigur, the Golden Fang
  9. The script is not for ordering cards. It's as a deck builder such as people entering the qty and card names of the cards and then it echo's them to show up on a page. That is why I have only the word qty and card, and not of your card is, and you have ordered. What I mean is : Output to come out like this. 4 dark ritual 4 phyrexian dreadnought 4 juzam djinn 4 illusionary mask 22 swamps 4 duress 1 mox jet Basically exports all that onto a page showing the quantity and card names only. It is not for an online store as I already have one. It is to allow players of the card game to input their deck lists and it outputs them onto a page. That is why I posted qty and name only in echo statements.
  10. <?php $card = 'black lotus'; $qty = 4; echo '<?php echo\'$card\'; ?>'; echo '<?php echo\'$qty\'; ?>'; ?> Testing to get variables to show up. Nothing shows up when using localhost to view it executed but not getting any line errors so far. trying to figure out how to get the $qty and $card variable to show up when running the script on localhost.
  11. The api i have is for the magic the gathering card viewer and prices, would i need another api, and if so, what would it be?
  12. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Deck Master</title> <style media="screen"> body { background-color:#f0f0f0; } #input-holder { padding:20px; border:1px solid #999; border-radius:10px; background-color:#fff; box-shadow:inset 0 0 20px #999, 3px 3px 3px #999; overflow:hidden; text-align:center; } #left-input{ float:left; overflow:hidden; } #right-input{ float:right; overflow:hidden; } #center-input{ display:inline-block; } .qty,.pht { float:left; } .qty { margin-right:10px; } .qty input { display:block; width:24px; margin-top:10px; } .pht input { display:block; width:130px; margin-top:10px; } @media screen and (max-width:650px) { #left-input,#right-input,#center-input{ float:none; display:block; margin:0 auto 10px; text-align:center; } .qty,.pht { float:none; display:inline-block; } } </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body background="background.jpg"><form name="frmEditCards" method="post"> <input type="hidden" name="Name" value="frmEditCards"> <form action="process.php" method="post"> <table border="0" width="100%"> <tr> <td valign="top" align="Center"> <h1> <font color="white">Deck Editor <small>(60 cards)</small> </h1> <div id="input-holder"> <div id="left-input"> <font color="black"> <label class="qty">Qty <input type="text" placeholder=""> </label> <label class="pht">Card Name <input type="text" placeholder=""> </div> <div id="right-input"> <font color="black"><label class="qty">Qty <input type="text" placeholder=""> </label> <label class="pht">Card Name <input type="text" placeholder=""> </label> </div> <div id="center-input"> <font color="black"><label class="qty">Qty <input type="text" placeholder=""> </label> <label class="pht">Card Name <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <br> <div id="left-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </div> <div id="right-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> <div id="center-input"> <label class="qty"> <input type="text" placeholder=""> </label> <label class="pht"> <input type="text" placeholder=""> </label> </div> </div> </table> <td colspan="2" align="center" name="Submit Deck"><input type="submit"></td> </body> </html> I am trying to use my submit form in html to post using php into orchard content management system in a user's blog. What I mean is, user uses form and the data is to be posted on the user's blog page with the deck name as a link on the blog and after clicking the link would show all the outputted data of the deck list they submitted. Trying to figure out how to get the submitted information onto the user's blog? Deck name will be added to form later on. <?php print "qty". $qty; print "card name". $cardname; ?> I am a beginner in php, so any help will be greatly appreciated.
  13. I am currently working on a web browser based mmorpg game. i have a database of items for it and the creatures and such. but what i need to help in what to do is the following: player buys or finds item A: player has 3 of all 5 different crystal colors which can be used to upgrade the weapon. but can only use a max of 3 crystals total per craftable item. player decides to use only one crystal type, and changes it to a frost blade. how do i make a table that references to the first one and if certain requirements are met that now show that the user has a new item. and even a newer item as he upgrades it 1 to 2 more times till the maximum upgrade per item limit? also, for the items in a persons backpack possession and those equipped. do i make another table listing that players items, or use the player profile table? and how do i show how many crystals that player currently has of each type?
  14. i believe <html> has to be the first line then your head and title and then any php scripts and then end with ?> and then </html>
  15. i need help with frames in php. i know how to do it in html, but what i'm trying to do in php is the same. i am having 4 frames, a left one with a navbar, the top one with a logo, and the right one with the current time and other links to the forums, and i'm an trying to have the main frame to show up in the center frame when they click on a link while keeping the other three tables the same. meaning if they click on the profile link it will show the same three frames but the profile.php to show up in the center table.
×
×
  • 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.