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]} {$ _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)....
User Profile
Collapse
-
It bites me all the time. I'm *finally* at a point where that's the first thing I check. Especially with older code....Leave a comment:
-
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);
...Leave a comment:
-
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/....Leave a comment:
-
-
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...
No activity results to display
Show More
Leave a comment: