를 통해 편집 MySQL의 내용에 일부 오류가내가 어떤 문제를 PHP
난 내 프로젝트를 수행하지만, 문제는 당신은 당신의 SQL 구문에 오류가
처럼에있다; '= 입찰' 이 근처에 '깜짝 ='ASD를 사용할 수있는 권리 구문에 대한 MySQL 서버 버전에 해당하는 설명서를 확인 1 ''라인 6 에서 편집 파일 편집 내 책 콘텐츠를
<?php
include("../includes/config.php");
$cuser = mysql_query("SELECT * FROM books");
$id = intval($_GET['id']);
$bname = strip_tags($_POST['bname']);
$bpic = strip_tags($_POST['bpic']);
$bdesc = strip_tags($_POST['bdesc']);
$bauthor = strip_tags($_POST['bauthor']);
$blink = strip_tags($_POST['blink']);
if(isset($_GET['edit'])){
$cuuser = mysql_fetch_object($cuser);
echo "<form action='editbook.php?edit=yes&id=".$cuuser->bid."' method='POST'>
<table>
<tr>
<td>bname : </td>
<td><input name='bname' type='text' value='".$cuuser->bname."' /></td>
</tr>
<tr>
<td>bpic : </td>
<td><input name='bpic' type='text' value='".$cuuser->bpic."' /></td>
</tr>
<tr>
<td>bdesc : </td>
<td><input name='bdesc' type='text' value='".$cuuser->bdesc."' /></td>
</tr>
<tr>
<td>blink : </td>
<td><input name='blink' type='text' value='".$cuuser->blink."' /></td>
</tr>
<tr>
<td>bauthor : </td>
<td><input name='bauthor' type='text' value='".$cuuser->bauthor."' /></td>
</tr>
<td><input name='do' type='submit' value='GO' /></td>
</table>
</form>";
}
if($_REQUEST['edit'] == 'yes'){
$uuser = mysql_query("UPDATE books SET
bname = '$bname',
bpic = '$bpic',
bdesc = '$bdesc',
bauthor = '$bauthor'
blink = '$blink'
WHERE bid='$id' ") or die(mysql_error()) ;
if(isset($uuser)){
echo "done";
}
}
?>
내가 삭제할 때의 저장 및 을 편집 할 쿼리 (= '$ 깜빡'깜박)하지만 난 내 프로젝트 노트에 필요 : 나는 많은 시간 동안 깜박 변경 (같은 문제) 다른 이름을 시도
PHP를 통해 mysql 콘텐츠를 편집하는 또 다른 방법이 있다면 매우 행복합니다 :) anything le 내 프로젝트가 제대로
'bauthor = '$ bauthor',', 쉼표를 유의하십시오. – Xorifelse
이것은 라이브 사이트가 아닙니다. –
해당 TYPO가 적절합니다. – RiggsFolly