• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help me become a better developer!

#5
[eluser]awpti[/eluser]
Thanks for the replies, gents!

I'm slowly working on the sql injections holes - mainly just checking if ctype_digit() against ID values.

Code:
if( !$this->uri->segment(2) || !ctype_digit($this->uri->segment(2)) ) {

If that little number fails, it just defaults to pulling the newest post and showing related comments.

As far as $limit - I always know that's going to be a numerical value. It's only ever passed internally.

( get_latest_news(3) )
( get_latest_news(1) )

I'll give that SQL Binding thing a try.


Messages In This Thread
Help me become a better developer! - by El Forum - 07-18-2007, 10:35 PM
Help me become a better developer! - by El Forum - 07-18-2007, 10:51 PM
Help me become a better developer! - by El Forum - 07-18-2007, 10:53 PM
Help me become a better developer! - by El Forum - 07-18-2007, 11:05 PM
Help me become a better developer! - by El Forum - 07-18-2007, 11:32 PM
Help me become a better developer! - by El Forum - 07-19-2007, 12:04 AM
Help me become a better developer! - by El Forum - 07-19-2007, 12:15 AM
Help me become a better developer! - by El Forum - 07-19-2007, 10:02 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.