Version 2
This commit is contained in:
27
pagecontent/action-vocEditSave.php
Normal file
27
pagecontent/action-vocEditSave.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$vocedit1 = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vocedit_1"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
$vocedit2 = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vocedit_2"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
$voc = substr($_POST["voc"], 0, 30);
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Content` WHERE `id` = '$voc' AND `type` = 'voc'";
|
||||
$result_articles = $conn->query($sql);
|
||||
if(mysqli_num_rows($result_articles) && $vocedit1 != '' && $vocedit2 != '')
|
||||
{}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
$value[0]['1'] = $vocedit1;
|
||||
$value[0]['2'] = $vocedit2;
|
||||
$value[0]['progress'] = "0";
|
||||
|
||||
$value = json_encode($value);
|
||||
|
||||
|
||||
$conn->query("UPDATE `VokabelBox2Content` SET `value` = '$value' WHERE `id` = '$voc' AND `path` = '$userid/lang/$list/'");
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user