Erkennen Session / Cookie-Variable in WordPress um den Zugriff auf Dokumente zu verhindern

 

und ich versuche das hinzuzufügen:

 <?php function checkValues($value) { // Use this function on all those values where you want to check for both sql injection and cross site scripting //Trim the value $value = trim($value); // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Convert all <, > etc. to normal html and then strip these $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES))); // Strip HTML Tags $value = strip_tags($value); // Quote the value $value = mysql_real_escape_string($value); return $value; } mysql_connect ("mysql.*****.com", "****","$*****") or die (mysql_error()); mysql_select_db ("https://wordpress.stackexchange.com/questions/16892/detect-session-cookie-variable-in-wordpress-to-prevent-access-to-documents/***********"); $term = checkValues($_REQUEST['val']); $term = mysql_real_escape_string($term); $sql = mysql_query("select * FROM patient_db WHERE id_number = '$term'"); if($row = mysql_fetch_array($sql)) { echo ""; echo '

'; echo '
ID Number: ' .$row['id_number']; echo '
Name: ' .$row['Name']; echo '
Exp. Date: ' .$row['exp_date']; echo '
DOB: ' .$row['dob']; echo '

'; //echo ""; } else { echo ""; print "

USER ID
NOT FOUND


"; print "OOPS!! THIS COULD BE AN ERROR
"; print "
"; print "
*****
"; } ?>

Solutions Collecting From Web of "Erkennen Session / Cookie-Variable in WordPress um den Zugriff auf Dokumente zu verhindern"