function set_post_password_field() { $roni = 0; foreach ($_POST as $postkey => $postval) { $final_post_val = clean_request_val($_POST[$postkey]); if (is_array($final_post_val)) { continue; } $posted_lookup_field = trim($final_post_val); //$posted_lookup_field = trim(clean_request_val($_POST[$postkey])); //trim errors out if input is array if (ereg("^" . AppSettings::$pswd_prefix . "pi([0-9]+)epi([0-9]+)ron([0-9]+)\$", $postkey, $regs) and !empty($posted_lookup_field)) { $prop_id = $regs[1]; $ent_prop_id = $regs[2]; $roni = $regs[3]; $_POST[str_replace(AppSettings::$pswd_prefix, "", $postkey)] = md5($posted_lookup_field); } } }
<?php include_once dirname(__FILE__) . '/../commonfunc.php'; site_setup(); // include_once ($_SERVER['DOCUMENT_ROOT'].'/classes/MainClient/Main.php'); // include_once ($_SERVER['DOCUMENT_ROOT'].'/classes/ClientServerDataOps/LookupTable.php'); // include_once ($_SERVER['DOCUMENT_ROOT'].'/functions/commonfunc.php'); $main = new Main(); //db connection LookupTable::get_table_and_field_by_prop_id(clean_request_val($_GET['prop_id']), $lookuptable, $lookupfield); $sql = "SELECT " . $lookupfield . " FROM " . $lookuptable . " WHERE " . $lookupfield . " LIKE '%" . clean_request_val($_POST[$_GET['postedfield']]) . "%'"; $resource = mysql_query($sql); ?> <ul> <? while($taken = mysql_fetch_assoc($resource)) { ?> <li><? echo stripslashes($taken[$lookupfield]);?></li> <? } ?> </ul>