<commit_before><?php

require_once 'config.php';

$link = mysqli_connect(
    $dbConfig['host'],
    $dbConfig['username'],
    $dbConfig['passwd'],
    $dbConfig['dbname']
);

if (isset($_POST['person'])) {
    // filter input by using bound parameters
    $sql = "INSERT INTO person (name) VALUES (?)";
    $statement = mysqli_prepare($link, $sql);
    // i = integer, d = double, s = string, b = blob
    mysqli_stmt_bind_param($statement, 's', $_POST['person']);
    mysqli_stmt_execute($statement);
    mysqli_stmt_close($statement);
}<commit_msg>revert to escaping in basic database access<commit_after><?php

require_once 'config.php';

$link = mysqli_connect(
    $dbConfig['host'],
    $dbConfig['username'],
    $dbConfig['passwd'],
    $dbConfig['dbname']
);

if (isset($_POST['person'])) {
    // filter input
    $person = mysqli_real_escape_string($link, $_POST['person']);
    $sql = "INSERT INTO person (name) VALUES ('" . $person . "')";
    mysqli_query($link, $sql);
}
{'fraction_non_alphanumeric': 0.18439716312056736, 'fraction_numerical': 0.0, 'mean_word_length': 4.34054054054054, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4114486', 'n_tokens_mistral': 338, 'n_tokens_neox': 329, 'n_words': 70}