0
保存的代碼幫助github我能這樣獲取從標籤面積值(類似計算器),並在數據庫
我想從拿數值創建一個輸入區域該I/P並將其保存在數據庫中。例如,在這種情況下(IMG)我想用來存儲所有的值,即HTML,PHP,JAVA,jQuery的數據庫
下面是代碼的一部分
<script>
$(function(){
$('#myTags').tagit();
});
</script>
</head>
<body>
<form class="form-horizontal" role="form" action="c_tag.php" method="post">
<ul id="myTags"></ul>
<input type="hidden" class="form-control" name="tags">
<button type="submit" value="submit" name="submit"> Submit <i class="fa fa-arrow-right"></i></button>
</form>
</body>
c_tag.php網頁代碼
$tag = mysqli_real_escape_string($con, $_POST['tags']);
$sql= "INSERT INTO usertags (tag) VALUES ('$tag')";
if(!mysqli_query($con,$sql)) {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
}
的問題是,當我得到重定向到tags.php頁,我沒有得到價值$標籤內
仍呈現@kavi試圖提醒'$( '[NAME = 「標籤」]')空值 – kavi
VAL()',並告訴我你得到 –
感謝它的工作,我的結尾有一些錯誤,因爲你的代碼不工作,但現在它的工作 – kavi