www.webdeveloper.com

Search:

Type: Posts; User: pcthug

Page 1 of 20 1 2 3 4

Search: Search took 0.05 seconds.

  1. In your machine.php you were applying...

    In your machine.php you were applying htmlentities before the variables were actually defined, this is why PHP was throwing 4 undefined variable notices.


    <?php
    session_start(); ...
  2. Replies
    17
    Views
    1,728

    Placing an i after the pattern delimiter will...

    Placing an i after the pattern delimiter will force the search to become case-insensitive;


    echo preg_replace('/there/i', 'World', 'Hello THERE'); // Hello World
  3. Replies
    3
    Views
    737

    For further reference about MySQL Date and Time...

    For further reference about MySQL Date and Time functions see: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
  4. Replies
    16
    Views
    1,420

    Found this cookie class I posted a while back....

    Found this cookie class I posted a while back. Just pass along the user's salt/username/password etc

    http://webdeveloper.com/forum/showpost.php?p=818285&postcount=2
  5. Replies
    17
    Views
    1,728

    :) Your Welcome. Glad to hear you wish to spread...

    :) Your Welcome. Glad to hear you wish to spread your knowledge to help others here.
  6. Replies
    17
    Views
    1,728

    preg_quote()...

    preg_quote()
  7. Replies
    3
    Views
    737

    This actually quite easy to achieve. If you just...

    This actually quite easy to achieve. If you just want to show the last 10 imported images you would use;


    $sql = 'SELECT id FROM images ORDER BY date_imported LIMIT 10';

    If you would rather...
  8. Thread: About forms

    by pcthug
    Replies
    6
    Views
    808

    Generally you will as previously discussed, allow...

    Generally you will as previously discussed, allow the photo to be uploaded to your web server. It should be saved in a directory that can be publicly accessed (e.g;...
  9. Replies
    16
    Views
    1,420

    There's no silver bullet in securing your site,...

    There's no silver bullet in securing your site, every new line of code presents the possibility for outside exploitation. PHP Security is a broad subject and can not be summarized in a single post.
    ...
  10. Replies
    16
    Views
    1,420

    Hi Joe, you will find the New Thread button on...

    Hi Joe, you will find the New Thread button on the top left on all sections of the forums. It is also at the bottom left of all of these pages.

    Look for this image:...
  11. :) Are you sure with so few videos that you...

    :)


    Are you sure with so few videos that you need such extensive sections?

    My only solution would be to create a new database table with a views (text) and expiry (datetime) column. Then on...
  12. No. You keep track of when the video was first...

    No. You keep track of when the video was first uploaded and then only display videos uploaded in the last 24 hours/1 week/1 month/etc. You then order the results by their respective viewcounts, this...
  13. Replies
    7
    Views
    998

    The libraries in NogDogs link...

    The libraries in NogDogs link (http://pear.php.net/search.php?q=captcha&in=packages&x=0&y=0) are pear captcha packages that are not at all related to reCaptcha (so you can use/create any form you...
  14. There is no simple way to do it without using...

    There is no simple way to do it without using excessive server resources or adding unnecessary rows to your database. You would not be seeing the exact results per se, but you would be seeing fresh...
  15. Replies
    1
    Views
    1,114

    View Post

    <?php

    if (isset($_GET['id'][1]))
    {
    session_start();
    $array = ( isset($_SESSION['ids']) && is_array($_SESSION['ids']) ) ? $_SESSION['ids'] : array();

    if (!in_array($_GET['id'],...
  16. Replies
    1
    Views
    504

    I have never used Simple XML before, something...

    I have never used Simple XML before, something tells me it may be Object Iteration of an object with a __toString() magic method.
  17. :)

    :)
  18. Replies
    6
    Views
    876

    Any variables used/declared do not need to be...

    Any variables used/declared do not need to be global if they are in a script that is included (unless of course you are using them outside of the global scope in functions of classes). Imagine any...
  19. To save the little overhead associated with a...

    To save the little overhead associated with a function call;



    if (!isset($_POST['company_name'][3]))
    {
    // too short
    }
  20. Replies
    9
    Views
    1,464

    Could you please point out the insecurities of...

    Could you please point out the insecurities of the method I explained previously?



    There's no real reason not to send it back to the same page/script. If you can avoid using cookies (especially...
  21. Replies
    9
    Views
    1,464

    For security purposes (so the end user can't...

    For security purposes (so the end user can't change sensitive values of the cookie i.e. user permissions, user id, etc) you should hash the value of the serialized array and a salt together and then...
  22. Replies
    9
    Views
    1,464

    Ok I have just built a quick untested class that...

    Ok I have just built a quick untested class that will do it for you. Just modify the constants in the cookie to match your environment (replace the salt with a random string preferably consisting of...
  23. Replies
    19
    Views
    7,534

    Try this code; RewriteEngine On RewriteCond...

    Try this code;

    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^www\.mainsite\.com [NC]
    RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.mainsite\.com [NC]
    RewriteRule /dev/beta/([a-z0-9]+)...
  24. Replies
    3
    Views
    832

    For future reference, this is the PHP Modulus...

    For future reference, this is the PHP Modulus Arithmetic Operator.
  25. :)

    :)
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles