I have 3 pairs sitting at my house. Got my 3rd last night off a mob while I soloed rikktor.
Code: Select all
foreach($_POST as $arg=>$val)if(preg_match("/^setting_/",$arg)) $vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
Code: Select all
foreach($_POST as $arg=>$val)if(preg_match("/^setting_/",$arg)) $vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
It searches and fixes settings on posts.Red Squirrel wrote:If you can say what this line of code does, you can WIN a FREE pair of CLAWS OF THE HOLY SQUIRREL!
I have 3 pairs sitting at my house. Got my 3rd last night off a mob while I soloed rikktor.
Code: Select all
foreach($_POST as $arg=>$val)if(preg_match("/^setting_/",$arg)) $vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
i knew it was for forums.Red Squirrel wrote:Close, but I should give some kind of indication of where it's used. It's for a forum script I'm coding. $_POST is an array with any information send via a form when you hit submit.
Actually, it was the "preg_match" part that got me thinking wtf. Not sure what the preg part denotes.Red Squirrel wrote:Your on the right track. But to not put too much essence on that sqlfixpost function, all that does is clean up the data of any inappropriate data that could be used to inject commands in the database. Other then that, it does not do anything special.
Also, it's part of the admin interface.
if it's anything like VB/C# for each is a conditional loop for elements of an array. It loops until the maxlength of the array.Red Squirrel wrote:perg_match checks for a regular expression match in a string. looking up foreach might help as well.
Code: Select all
foreach($_POST as $arg=>$val)
{
if(preg_match("/^setting_/",$arg))
{
$vararray[str_replace("setting_","",$arg)]=SBsqlFixPost($val);
}
}
Code: Select all
color 0a
cmd
ping uovalor.com
tracert uovalor.com
lol my first post on aovNosferatu wrote:for each post that has (something innapropriate?) it prevents the post and sends it to the fix post menu?