Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. it i-t it Say it 3 times and it's yours.
  2. wow I felt like I was just watching a 50's tv show...
  3. In short, they are used as a delimiter for various things.
  4. HAHA NICE I too like how the BLAH breaks apart. I vote that for top smiley.
  5. Think you would have learned by now how saying "doesn't work" is not helpful... anyways, most immediate thing I see wrong is that you probably want to move the hyphen to the beginning or end of that last character class. As it stands right now, you are telling it to match on range of . to @ if that doesn't fix whatever "doesn't work", I suggest you provide more detail as to what you mean by "doesn't work." p.s.- thread moved. Another thing I would have thought you would know by now...
  6. Mark has 4 exclamation marks. Dewayne only has 3. Does that mean you love Mark more?
  7. Sessions are hacked because people do not use them properly, or else they are using them on a server that is not set up properly, or else they are using them on a shared server, where it's not as secure in general. If you really feel nervous about it, you can do things like create your own session ids, store them in a database, pass tokens to the users on the forms to validate and make sure data is coming from them, etc.. But considering your previous method involved just passing stuff in hidden fields... I do not think you really need to be worrying about whether these session variables will be hacked or not. Whatever level of secure sessions are, it's a lot more secure than what you're doing right now. Personally, I would just focus on validating the submitted information in your process script. If the data being submitted is sensitive enough to warrant it, consider getting a certificate to have your pages be https (ssl).
  8. that's what functions are for. Alternatively you can create a class. Or put the code in separate files and include or require when necessary.
  9. page1.php <?php session_start(); // display page 1 of form, submit to page2 ?> page2.php <?php session_start(); $_SESSION['page1'] = $_POST; // display page 2 of form, submit to page3 ?> page3.php <?php session_start(); $_SESSION['page2'] = $_POST; // display page 3 of form, submit to processing script ?> processingScript.php <?php session_start(); // example: dump all info to see where they are echo "<pre>"; // page 1 print_r($_SESSION['page1']); // page 2 print_r($_SESSION['page2']); // page 3 print_r($_POST); ?>
  10. pass the info via session variables.
  11. better to be a smartass than a dumbass.
  12. how about having the smacked smiley also do the "BLAH BLAH" text like in that other smiley, so it looks like he's talking stupid shit and then gets smacked
  13. $modes = array('live' => 'https://website.page1.com', 'test' => 'https://website.page2.com', 'sim' => 'https://website.page3.com'); $this->form_action_url = ($modes[MODULE_TEST_STATUS])? $modes[MODULE_TEST_STATUS] : 'test'; // change 'test' to whatever default you want it to be;
  14. How are you "picking" these options? From a dropdown in a form? Can you just make MOD_TEST_STATUS a string containing the link, and just assign it directly to $this->form_action_url ?
  15. I would not recommend suppressing errors, even notices. A notice will not halt the execution of a script, but they could nonetheless cause you trouble. For instance, are you expecting results from that query whenever it is run? If you are, then your script will happily keep running its course, without those expected variables. This could cause any number of errors down the road. You should script your code not to have any errors in the first place, even notices. One way to do that would be to use a condition with a count on mysql_num_rows before running the while loop. If it is > 0, run the loop. else, do something else (or nothing, depending on what this script is supposed to be doing). @PFM ah good eye, I missed that fetch_row
  16. It looks like your query is either failing or else returning 0 results (I assume the latter, or else you would be seeing a mysql_error from your die() ), and therefore $thisrow['AEP'] etc... do not exist. It is just a notice; php telling the element for that array does not exist.
  17. hybride...you can't just have an elseif in there without an actual condition... OP: what do you mean by "add a third link" ? That piece of code there is saying "If this constant is true, assign this string (page1.com link) to a property, otherwise (if the constant is not true), assign this other string (page2.com link) to the property. So...how is this 3rd link supposed to figure in there? What condition(s) must be met?
  18. does that thing support bluetooth?
  19. I think it would be easier for you to rig the previous code(s) posted. Setup some extra conditions and random number generation to inflate the lower numbers coming up. For example: <?php $num = 100; while ($num >= 1) { $x = rand(1,2); if($x == 1) $num = ($num > 51) ? 51 : $num; $rN = rand(1,$num - 1); $d[] = $rN; $num -= $rN; } echo "<pre>"; print_r($d); echo array_sum($d); I have no idea what kind of odds that produces, but overall the idea is that 50 percent of the time it will cap the max range at 50 so the random numbers generated that add up to 100 will (ideally) half the time be generated as <= 50. You could extend this or play with it; point is to rig it to get the lower numbers to come up more often. Only way to have an equal chance of any combination to show up though is, as mentioned by many, to generate all of them and then pick one at random, which IMO is not feasible. Better to fake it/simulate it and approximation.
  20. if (trim($quotescontent) != "")
  21. What? It's only 32 bit? So you're telling me that this uber pimp computer is still going to fuck up my dates in 2038? Spend obscene amounts of money and still can't get a stupid date right. I think we were better off throwing sticks and beating our chests and being amazed at fire. Can't go wrong with fire. Fire never failed to do its job.
  22. I think your overall math may be a bit off there... while that is true, the odds of you getting 100 1's are not the same as you getting 99 + 1
  23. sweet! where do I sign up? I just got this new email address: [email protected]' RAPE YOUR DATABASE CODE HERE
  24. Well he already posted code that had nothing to do with it. I have a sneaking suspicion he did not write this script.
  25. lol mark I edited my post to put my code in, saw that you posted almost the exact same thing, except you add up insteda of subtract down. One thing about yours though is that you include 0 in the range. I don't know if this is something the OP would want. I mean, I guess technically 100 + 0 = 100, but dunno if he really wants that...I kind of assumed he would not want that one, so I did not account for it. But anyways, it gives your code the side effect of randomly generating 0's. It still adds up to 100 and all, but you're gonna have to do something about multiple zeros showing up (or at all, unless it's 100 + 0).
×
×
  • 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.