Jump to content

HuggieBear

Members
  • Posts

    1,899
  • Joined

  • Last visited

Everything posted by HuggieBear

  1. There's nothing wrong with that code, and the specifications state that you can use the 'value=' attribute to set the default file, to circumvent the 'Browse' button. So what's the actual problem you're having? Regards Huggie
  2. No problem, your code was fine, it was missing one important character though. The circumflex (^) at the start of the character class that negates it. Basically says, match anything that's NOT one of the following characters. I just used the word meta character (\w) to simplify what you'd written. Regards Huggie
  3. OK, please tell me that you're fully aware this script is only catering for dates in the year 2000! So if you're trying to retrieve something that you expect to be outside that year, that's why you're getting no results. Regards Huggie
  4. Try this... <?php $pattern = '/[^\w\.]/i'; $replacement = ''; $out = preg_replace($pattern, $replacement, $string); echo "out: $out"; ?> This says replace anything that's not a word character (letters a-z, numbers 0-9, and the underscore) or a period (.) with nothing. Regards Huggie
  5. This isn't possible when using the POST method. This is a browser 'feature' so there's nothing you can do about it. If you use the GET method you won't have this problem. Regards Huggie
  6. Glad to be of assistance Huggie
  7. It should be as simple as using the explode() function in conjunction with the list() function... <?php $email = "huggiebear@domain.com"; list($before, $after) = explode('@', $email); ?> Regards Huggie
  8. Try This sql... SELECT * FROM table_name ORDER BY date_column DESC LIMIT 10 Regards Huggie
  9. I'd take a look at the function preg_replace() See how you get on with that one and then post back with any problems. Regards Huggie
  10. Yeah, that looks pretty nasty. I'll post it for you at the weekend. Huggie
  11. My advice here would be to use preg_replace_callback() I've just written some code that you might find useful. I'll forward it onto you at the weekend. Regards Huggie
  12. [quote author=lovemy7 link=topic=124877.msg518926#msg518926 date=1170338641] To hvle: Do not judge the whole book by a few words! You do not know everything and all you have succeeded in doing is pissing me off. Please post a photo of you walking on water. [/quote] Superb... Don't say I didn't warn you hvle! I know what you're dealing with lovemy7, I've dealt with both banking and insurance institutions so I know what the guidelines are like.  However, based on the amount of code you've said there is, the chances of PHP making a mistake and not you, are looking very slim. I'm afraid I can't really comment any more on this post past what I already have, as there's no issues with the code syntax you've shown us. Good luck in your quest. Regards Huggie
  13. Yes, PHP and MySQL can do this very easily, the code would be so short that if you printed it onto A4 paper, it probably wouldn't take more than a single page. But before you do anything you need to get your database sorted, along with the structure of your directories containing the downloads and the images that display what the font looks like. Also, I notice you're using some php for that site anyway. Regards Huggie
  14. This is assuming they're using a Microscoff Windoze server! Regards Huggie
  15. Maybe I'm reading this wrong, but this looks like JavaScript. JavaScript is a client side language and PHP is a server side language. They're totally different, so if you want to use the above but on a PHP page, it's no different from standard HTML. Use it exactly the same. Regards Huggie
  16. It's not an error. Table aliases don't need to use 'AS' the same way that column aliases do. Regards Huggie
  17. You should use checked="checked" to make it standards compliant, not just checked JC, looking at the code, you're implying you have two columns, one called 'yes' and one called 'no'. Is that correct? Regards Huggie
  18. My SQL knowledge is a little bit lacking here, but someone who's more confident with it maybe able to correct me. I think that you could use count() along with GROUP BY and HAVING to achieve the result that you want. Regards Huggie
  19. [quote author=hvle link=topic=124877.msg518860#msg518860 date=1170330194] shoosh, get back with your boozeee bear. [/quote] Sorry I didn't reply sooner, I've been in the pub ;) Lovemy7, if you're certain that you haven't made a mistake then maybe you could post the complete code, with errors in, and we'll take a look. Regards Huggie
  20. [quote author=hvle link=topic=124877.msg518855#msg518855 date=1170329783] I honestly do not believe you are an experienced PHP programmer due to the way you write your code: [/quote] Hey, this isn't a forum for flaming! Huggie
  21. [quote author=lovemy7 link=topic=124877.msg518847#msg518847 date=1170328718] So I will again ask my original question...does PHP back reference a variable to it's original components thus allowing the clock to run even though its has been concatenated and cast to a string? [/quote] No, you can use references, but in this instance, the answer is no! You must have reassigned it somewhere in the code. Regards Huggie
  22. For a start, what do you think the 'J' in aJax stands for, so by suggesting one over the other, you possibly haven't quite grasped the concept of it yet. In addition, my above comment aside, how can you make such an assumption without knowing what s/he wants to display. Suppose the radio button is a "Select your free gift" on the order form of their website... when they click the radio button the poster wants to check the database to see if there's any of that gift in stock, and if not display an image of a cross next to the button, or a tick if it is in stock. How do you do that in just Javascript alone? Regards Huggie
  23. WHY!?!?! mysql_fetch_array() is preferable to mysql_fetch_assoc() as it's more flexible. Just use it with the additional constant of MYSQL_ASSOC... $row = mysql_fetch_array($result, MYSQL_ASSOC); Regards Huggie
  24. Simplify the above by just using this: [code=php:0]$_SESSION['invoiceData(4)'] = $row_FindUser['userID'] . "-" . date("U");[/code] Then use $_SESSION['invoiceData(4)'] everywhere from now on, (including when you insert into the database) this way you'll be guaranteed the value always remains the same. Regards Huggie
  25. OK, can you elaborate a little. How are you creating the array, Which database column forms the key (if any), Likewise for the value, What do you want to look for duplicates in? Regards Huggie
×
×
  • 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.