Search results

  1. M

    Storing phone numbers in a database.

    Funny, I just noticed a bug in a system I'm working with today which does this. Int in mysql defaults to a 32 bit storage capacity, 2147483647 is 2^32 -1. If your number is bigger than that, to prevent overflow it'll just store it as the the highest 32 bit number possible aka 2147483647...
  2. M

    How do I send text messages to a phone using php?

    send_text_message($your_message, $phone_number); Don't forget to include the country code!
  3. M

    What CMS are you using?

    Well if you use PHP look at Wordpress, it's pretty easy to use.
  4. M

    Need help to get username from user_id

    Run the query: select * from `users` where userid = $userid limit 1 that will give you an array back with the variables you need. Also you need to escape the title, post etc in the insert statement as they are vulnerable to sql injection attack, and you need to escape...
  5. M

    PHP Arrays help

    It's because: [PRODUCTS] => Array ( [PRODUCT] => Array() ) Products is inside product so you would need: $arr['WHMCSAPI']['PRODUCTS']['PRODUCT']['USERNAME'];
  6. M

    Link bassed on what was typed into box.

    You could do this in PHP very easily: if(isset($POST['text_sub'])){ if($POST['text_sub'] == 'yourtext') header('location: success.php'); else header('location: fail.php'); }
  7. M

    Need To Do Web Site Update

    Are you looking to get stuck in with the source code of the website or use Dreamweaver's drag and drop interface? It's probably early days, but for the content management side of things look at WordPress, when you get your head around making things in html, you can just slap it onto WordPress...
  8. M

    Some recommendations for a small Ecommerce site

    I would never discourage anyone from making something from scratch, especially since I do it all the time. But what I would say is have a look at what is available first, there is a lot to think about when creating bespoke e-commerce site. You have to be very sure it's secure, especially since...
  9. M

    Forums - The basics?

    I'll give this a bash, answers in bold:
  10. M

    PHP File Access

    Another solution is to store it outside the web directory. For example store it in the directory above where you put the rest of your website.
  11. M

    Finding a series of dates in a database

    That depends how your data is formatted and where it is stored. You'll need to provide more info.
  12. M

    Web Certification: Where To

    I have a CS degree as well, in my eyes it makes your more than qualified. You'd be better spending your time seeking work and building your portfolio, that's all employers/clients want to see.
  13. M

    Invisible text frowned upon by Google? Even get you banned?

    It would actually be very easy to detect if text has the same colour as it's background. I could sit here and write a php script to do that in about 20 minutes. I wouldn't underestimate the amount of effort search engines pour into this, and for the sake of a few lines of text which will...
  14. M

    PHP Short Tags

    The worst part is if short tags are disabled on a configuration where they were previously allowed the server will sometimes output the script to the user as plain text. Never an ideal scenario.
  15. M

    using javascript to create a radio button out of an anchor.

    Hmm, we did something similar to this a while back but kind of faked it. <a href="#" title="Show/Hide"> <img src="/img/closed_icon.png" alt="Closed"/> </a> <img src="/img/closed_icon.png" alt="Closed"/> or <img src="/img/open_icon.png" alt="Open"/> The images just look like...
  16. M

    PHP - Hiding MySQL Parameters

    Do you mean when sharing the scripts with others? I usually define variables like that which don't change else where in another file anyway using: //constants file define('DB_SERVER', 'localhost'); define('DB_USER', 'admin'); define('DB_PASS', 'password'); define('DB_DATABASE'...
  17. M

    PHP Short Tags

    If you've ever ported a website from a host that allows them to a host that does not then you realise the faff involved when making the website compliant. It's safer just to use <?php just to be sure, 3 characters for the sake of compliance!
  18. M

    PHP - Hiding MySQL Parameters

    I don't quite understand what you mean, if you mean preventing them from displaying to the client if an error occurs you can hide errors using ini_set('display_errors',0); error_reporting(0); If you mean when sending people php files, just remove them from the script :p
  19. M

    .htaccess hiding .php

    You could have something like: #RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-/]+)$ $1.php/$2 [L] I haven't tested it but if that doesn't work it won't be far out.
  20. M

    Just a quick question about links on your Website

    It depends from website to website. Some will let you and others won't. What you're proposing is called 'hotlinking', basically you are displaying content on your website which isn't yours and the original owner still takes the bandwidth hit. It's always best to ask as even if it isn't...
Top