Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Not quite sure what you're asking there, but you should always leave an alternative for users with JS disabled. On the form tag you can use the onsubmit attribute to call a function that will return true (and submit the form normally), or false (and the form won't be submitted): <form (...) onsubmit="return submitUsingAjax();"> That way if the user doesn't have JS enabled, the form will submit like normal. If JS is enabled the submitUsingAjax() function will be called and the result determines whether or not the form should be submitted.
  2. the182guy's method would also be a lot faster.
  3. You can do that using the SimpleXML extension: $url = 'http://mobsters-fb-apache-dynamic-lb.playdom.com/mob_fb/get_hit_list?user_id=100000952273457&target_id=100000556624340&level=300&auth_key=cb07c7575b38df48d82dd53619385faa884db5a2'; $xml = new SimpleXMLElement($url, null, true); foreach ($xml->xpath('/outer/xml/entry') as $entry) { if ($entry->amount > 4100000000) { echo 'Targeted user: ' . $entry->target_user->user_id . '<br />'; } }
  4. You'll need to use a third-party payment gateway to process the transactions, which will cost. To make the payment secure you'll need to use SSL, and the certificate for that will also cost I'm afraid.
  5. How did you solve this? I'm not sure if you know but "=" in JavaScript means 'takes the value of', "==" means 'equal to'. Unless this is fixed your IF expressions won't evaluate the way you think.
  6. Did you try searching on Google..? http://www.google.co.uk/search?q=javascript+confirm+leave+page
  7. You don't have to assign it an alias. By fetching the data with mysql_fetch_array you could have used either $count_array[0] or $count_array['count(upgrading)'] to access the value.
  8. Have a read up on how to use mysql_query right - you need to use it in conjunction with mysql_fetch_array.
  9. select count(upgrading) from table_name where upgrading = 1
  10. Just run a query like: select count(column_name) from table_name where column_name = 1
  11. 'Column' can have several meanings, can you be more specific?
  12. Oh right, sounds like you don't want to encode the hash then. You should be able to just use the example in the other post, but replace .search for .hash.
  13. I imagine you don't want the hash value to be "schedule&class=history" though..? If you want 'node' to equal "home#schedule" you'll need to encode the hash: index.php?node=home%23schedule&class=history Now you're able to return the query string as you expect it with window.location.search. This post contains an example of how you can return a specific parameter from that.
  14. Have you tried Google..? http://www.google.co.uk/search?q=php+regex+turn+urls+into+links
  15. You mean at the beginning of the file name you're inserting? That won't work; mysql_insert_id is only available after the query has been executed.
  16. Just last night - she was great. But no matter what opinions ppl have, i want younger guys to know that there IS an alternative, you dont have to be someone your not to impress trashy girls in your school/office, you can have the best looking girls anytime you want and i must emphasize THE BEST LOOKING GIRLS.....its the upper class way, look at American psyco movie - upper class guy with good looks gets the girls he wants (and does the things he wants) Ive converted many a unhappy man in relationships over to brothel shagging, cause NOTHING competes with it Ha, eh? American Psycho? The plot thickens, I thought date rape was bad. There's a few things wrong with your motto. As CV says, what did you even get out of it? Surely the novelty's worn off. You sound like an old perv "i want younger guys to know" - sounds like you're filling a void of depression if I'm honest! Who even has to try for trashy girls anyway? I'm all for the banter between mates when you're single, but it is between mates and not a PHP community on the internet? As CV says as well, when you are in a relationship it's good. What you're talking about just sounds desperate.
  17. He's just living the dreamwest.
  18. First up, NEVER rely on a cookie for user authentication. It'd take a user a few seconds to modify the cookie to be any user they want. Not only that, but not every user has JavaScript enabled. You need to look server-side for a secure login. I'd read up on a few PHP user login tutorials to familiarise yourself with the logic behind it. Then I'd also have a good read up on security (to ensure your system has no vulnerabilities), PHPFreaks have a good tutorial on security. Then I'd scrap the tutorials you read and write your own from scratch, then have someone look over it; to ensure you understand the concept and are following the best practises. JavaScript though is certainly not the way to go.
  19. If called in-line, it will just write the string where it's called. Behaviour varies when called from an event though. It doesn't actually refresh the page, it just overwrites the content.
  20. Not far off.. function my_first_function(){ var text1 = 'monkeys'; if (document.getElementById('input').value != text1){ document.getElementById('p_element').innerHTML = 'wrong text'; }else{ document.getElementById('p_element').innerHTML = 'your correct'; } }
  21. Think he's down brothel again..
  22. Go on dreamwest.. touch it.. you know you want too!
  23. HA! So it's actually hookers?? That means you've only put in the derty work to get 5 in the last 6 years.. And did you drug 'em or summit?? Christ I've had more than that and I've not even been sexually active 6 years! Edit.. I'll also add, 100 times each different? That means they don't want seconds pal!
  24. That just raped my Friday afternoon mind!
  25. Adam

    Use of %

    They're special place-holders that are replaced by sprintf / printf. In your example they are replaced by the second and third (string) arguments in the call to (s)printf, but in reverse order.
×
×
  • 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.