forked from science-ation/science-ation
Fix syntax
This commit is contained in:
parent
790ba92692
commit
6730e9ba8a
@ -713,9 +713,9 @@ function user_dupe_row($table, $key, $val, $newval)
|
||||
$keys = '`' . join('`,`', array_keys($i)) . '`';
|
||||
$vals = join(',', array_values($i));
|
||||
|
||||
$q = "INSERT INTO $table (?) VALUES (?)";
|
||||
$q = "INSERT INTO $table ($keys) VALUES ($vals)";
|
||||
$r = $pdo->prepare($q);
|
||||
$r->execute([$keys, $vals]);
|
||||
$r->execute();
|
||||
show_pdo_errors_if_any($pdo);
|
||||
|
||||
$id = $pdo->lastInsertId();
|
||||
@ -867,7 +867,7 @@ function user_valid_user($user)
|
||||
function user_valid_password($pass)
|
||||
{
|
||||
/* Same as user, but allow more characters */
|
||||
$x = preg_match('/[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]/', $pass);
|
||||
$x = preg_match('[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]', $pass);
|
||||
|
||||
/* If x==1, a match was found, and the input is bad */
|
||||
if ($x == 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user