This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hobo_escape($val){ | |
// because there is no good way to escape a dynamic table/field name | |
$ret = preg_replace('/[^a-zA-Z _]+/', '', $val); | |
$ret = preg_replace('/\s+/', '_', $ret); | |
return $ret; | |
} | |
// Credentialing for MySQL server if you want the code to create table and load data automatically |