User Profile

Collapse

Profile Sidebar

Collapse
godrifle
godrifle
Last Activity: Sep 28 '07, 06:43 PM
Joined: Nov 28 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • godrifle
    replied to Concate
    in PHP
    Arrays, when included inside double quotes, should have curly brackets surrounding them, such as:

    [PHP] echo "<tr><td width=150 valign=top>Welc ome Mr. {$_SESSION[name]}&nbsp;&nbsp;{$ _SESSION[lname]}<img src=\"a.jpg\"></td>";[/PHP]

    and double quotes inside of a string enclosed in double quotes must be escaped (see the image tag above)....
    See more | Go to post

    Leave a comment:


  • godrifle
    replied to Problem with PHP discussion forum
    in PHP
    It bites me all the time. I'm *finally* at a point where that's the first thing I check. Especially with older code....
    See more | Go to post

    Leave a comment:


  • godrifle
    replied to Problem with PHP discussion forum
    in PHP
    Probably view.php has short PHP tags. You should replace them with full tags:

    <? should be <?php

    Also, you can eliminate the worrisome register_global s by putting the following at the top of each PHP script:

    extract($_POST) ;

    Any scripts that pass variables and values via URL (like edit-post.php, delete-post.php, and view.php) will also need:

    extract($_GET);
    ...
    See more | Go to post

    Leave a comment:


  • godrifle
    replied to PHP/MySQL login script strength. Good enough?
    in PHP
    It looks good to me. Good to see you're storing password as MD5 hash instead of plain text.



    I'd put any file containing credentials outside the web root directory, so that the server simply can't serve it up. For example, if your Apache web root is /var/www/html/, I'd store all my credential includes (or any file that *should* be private) in /var/www/....
    See more | Go to post

    Leave a comment:


  • godrifle
    replied to Replacing image tags in entirety
    in PHP
    Figured it out. [/CLOSE]
    See more | Go to post

    Leave a comment:


  • godrifle
    started a topic Replacing image tags in entirety
    in PHP

    Replacing image tags in entirety

    I hope this is the best way to explain what I'm trying to do, using PHP5.

    Given the following HTML sample...
    [html]
    <html><head><ti tle>The Page</title></head>
    <body>
    <h2>A Title</h2>
    <img alt="zfMs|SCRIP TURE|1COL1ROW" src="./scripture.gif" style="left: 507px; position: absolute; top: 85px;" />
    <p><strong>So me...
    See more | Go to post
No activity results to display
Show More
Working...