dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: NogDog

Page 1 of 20 1 2 3 4

Search: Search took 0.27 seconds.

  1. Replies
    4
    Views
    338

    Every programming language you learn makes you a...

    Every programming language you learn makes you a better programmer, even in the languages you thought you were already good in. :)

    PHP, Java, and .NET (C# and/or ASP) still dominate the web, with...
  2. Just brainstorming here, so take this with a...

    Just brainstorming here, so take this with a grain of salt; but I'm thinking you could store the most recent session ID in the DB for that user. As part of the login process, when a successful login...
  3. Replies
    2
    Views
    215

    How about... SELECT MAX(visit.date) AS...

    How about...


    SELECT MAX(visit.date) AS last_visit_date . . .
    ...?
  4. Replies
    8
    Views
    295

    I think the "honeypot" idea is that it looks like...

    I think the "honeypot" idea is that it looks like a field to be entered to a bot script, but since it's hidden via CSS, a normal "human" user would never fill it in. I suppose its effectiveness will...
  5. Replies
    8
    Views
    295

    I may have misinterpreted what you meant about...

    I may have misinterpreted what you meant about the email validation.

    One of the simplest ways to protect against email header injection is to simply not allow (or strip out) carriage return and...
  6. You won't interpolate $product_image in this...

    You won't interpolate $product_image in this code:


    move_uploaded_file($product_image_tmp, 'product_images/$product_image');

    You need to either use double quotes (since variable interpolation...
  7. Replies
    8
    Views
    295

    While item #2 is a nice UI feature, you still...

    While item #2 is a nice UI feature, you still need to validate that the fields are filled in on the PHP side, since JavaScript validation is easily bypassed by malicious users -- or simply someone...
  8. Well, in a real-life situation, at that point I'd...

    Well, in a real-life situation, at that point I'd probably be asking, "Why am I getting so many arrays?" :)

    It may be that he wants you to do something with a recursive (self-calling) function,...
  9. Probably the simplest way would be 4 nested...

    Probably the simplest way would be 4 nested foreach() loops. (I'll see if that's enough of a hint before posting anything more. ;) )
  10. Replies
    5
    Views
    381

    I'm guessing (and it's admittedly a guess), that...

    I'm guessing (and it's admittedly a guess), that you're looking to submit from your web site's server-side processing to another site's form? If so, then in PHP you're looking at using the cURL...
  11. Thread: img id in echo?

    by NogDog
    Replies
    10
    Views
    378

    Define "doesn't work". Do you know for sure...

    Define "doesn't work".

    Do you know for sure that $id has a value at that point?

    In any case, it's not necessary to use concatenation with a simple scalar variable like that:


    echo "<img...
  12. Yeah, if you want the DB to do it, it would take...

    Yeah, if you want the DB to do it, it would take 2 queries, just the nature of the beast and not necessarily any worse than fetching all the rows in one query and then doing the summing in PHP....
  13. I'm guessing what I consider "simple" may not be...

    I'm guessing what I consider "simple" may not be the same as you? ;)

    Here's a brief example of how I'd do it:

    <?php
    $pdo = new PDO('mysql:host=localhost;dbname=test', 'dbUser', 'dbPassword');...
  14. Replies
    4
    Views
    470

    Everything looked nominal to me when I tried...

    Everything looked nominal to me when I tried this:


    <?php

    echo "<pre>".htmlspecialchars(file_get_contents('9663testme.docx.html'))."</pre>";

    (PHP version 5.5.12)
  15. Merged the duplicate threads.

    Merged the duplicate threads.
  16. You must be very careful with your quoting:...

    You must be very careful with your quoting: computers are stupid and don't think for themselves. I made several adjustments, adding comments where I did:


    <?php

    $con =...
  17. Replies
    4
    Views
    470

    Does the generated HTML include anything in the...

    Does the generated HTML include anything in the doctype or a meta tag saying what encoding it's using? (e.g. Windows-1252 or CP-1252 ?)
  18. Not 100% sure this will work, but worth a try: ...

    Not 100% sure this will work, but worth a try:


    $select = "SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(Course_duration))) AS total_time
    FROM $tb2 WHERE Ass_Name='$name'";

    (I hope you're properly...
  19. Thread: array sum

    by NogDog
    Replies
    1
    Views
    330

    Sorry, but I don't understand what you are doing...

    Sorry, but I don't understand what you are doing and what you need to know.
  20. Replies
    7
    Views
    517

    This test will always fail, as you are assigning...

    This test will always fail, as you are assigning false to everything:


    if ($err_1 = $err_2 = $err_3= $err_4 = $err_5 = $err_6 = $err_7 = $err_8 = false) {

    What you probably want is:


    if...
  21. Thread: JOIN mysql php

    by NogDog
    Replies
    9
    Views
    635

    But how do you know which row to pull from the...

    But how do you know which row to pull from the tables -- i.e., where is your WHERE clause in the query?
  22. Replies
    7
    Views
    517

    So...what is the error? Did you check the error...

    So...what is the error? Did you check the error log? Or have you turned on display_errors and set error_reporting to E_ALL? Did you try a "php -l filename.php" from the command line to look for parse...
  23. Replies
    7
    Views
    517

    Probably a combination of search bots and people...

    Probably a combination of search bots and people searching for answers to their own problems. (This site gets up on Google quickly.)
  24. Replies
    8
    Views
    525

    I didn't really start any sort of serious...

    I didn't really start any sort of serious learning of programming until I was in my 40s. (I'm not claiming that now in my later 50s I'm God's gift to the programming world, but I do sustain myself...
  25. Replies
    8
    Views
    525

    Generally within your development stack, you'll...

    Generally within your development stack, you'll stick to one server-side language -- though technically you don't have to, and different parts of your site might run under different languages, even...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles