mikk809h Posted May 15, 2013 Share Posted May 15, 2013 Hello! im wondering how to post multiple keys to a webpage.. but somehow it doesnt work really.. if (isset($_POST['key'])) { $userKey = $_POST["key"]; if ($userKey == $key) { if (isset($_POST['licensekey'])) { $lic = $_POST['licensekey']; echo $lic; -- when echo'ing, it returns 3 blank spaces. How do i post multiple strings/keys to the webpage then? Thanks in Advance Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 15, 2013 Share Posted May 15, 2013 your post doesn't show what you mean by multiple strings/keys, so this is just a guess, but i suspect the answer involves arrays. Quote Link to comment Share on other sites More sharing options...
Phear46 Posted May 15, 2013 Share Posted May 15, 2013 if(isset($_POST['<NAME OF SUBMIT BUTTON>'])) { $userKey = $_POST['key']; $lic = $_POST['licensekey']; } to see what has been 'sent' to your script use: print_r($_POST); if nothing is returned, your sending nothing which is why you have blank space. Quote Link to comment Share on other sites More sharing options...
mikk809h Posted May 15, 2013 Author Share Posted May 15, 2013 (edited) it returns 1 long string (the key), but after that, it returns "Array" EDIT: maybe im posting wrong? This is the part, of the posting mechanism: "key=" .. key .. ", licensekey=" .. computer[pos].key); <?php $key = 'personalcode_not_shared_online'; if(isset($_POST['key'])) { $userKey = $_POST['key']; $lic = $_POST['licensekey']; print_r($_POST); } ?> Edited May 15, 2013 by mikk809h Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 15, 2013 Share Posted May 15, 2013 until you define what you mean by "multiple strings/keys" and then share that definition or a diagram with us, we cannot help you. Quote Link to comment Share on other sites More sharing options...
mikk809h Posted May 15, 2013 Author Share Posted May 15, 2013 But... Mac_Gyver.. if Phear understand what i mean. then you dont have to post the same post again. if you're not understanding what i mean, then dont try to help me! Quote Link to comment Share on other sites More sharing options...
mikk809h Posted May 15, 2013 Author Share Posted May 15, 2013 as i said in previous post; This isnt the right posting method, right? "key=" .. key .. ", licensekey=" .. computer[pos].key); Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 15, 2013 Share Posted May 15, 2013 mikk809h, Phear showed you some troubleshooting logic in the hope that you would show us the output from it so that we could see how your submitted data is organized. you still haven't shown how you are submitting multiple sets of data, so you haven't gotten anywhere with this problem. you either must use an array name for your form fields (preferred method as it allows any number of data items in the set) or give each one a unique name (not preferred as it takes more code to keep track of the unique names). Quote Link to comment Share on other sites More sharing options...
mikk809h Posted May 15, 2013 Author Share Posted May 15, 2013 BUT! i just want to know, what the "array" means... did that then mean that i've posted something wrong, or! and as i said.. do anyone know if this posting method is correct (does i need like an ? after the $key='$key') "key=" .. key .. ", licensekey=" .. computer[pos].key); Quote Link to comment Share on other sites More sharing options...
Barand Posted May 15, 2013 Share Posted May 15, 2013 .... if you're not understanding what i mean, then dont try to help me! Your wish is our command. Quote Link to comment Share on other sites More sharing options...
Dathremar Posted May 16, 2013 Share Posted May 16, 2013 ... if you're not understanding what i mean, then dont try to help me! I was going to GUESS what you mean and try to help you, but after reading this, my will is gone. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.