<?php
require "database.php";
$to=$_GET['toF'];
$content=$_POST['message_contentl'];
$from=$_GET['fromF'];
$ck_reciever = "SELECT Username FROM accounts WHERE username = '".$to."'";
if(mysql_num_rows(mysql_query($ck_reciever)) == 0){
die("The user you are trying to contact don't exist. Please go back and try again.<br>
<form name=\"back\" action=\"Send_FR.php\" method=\"post\">
<input type=\"submit\" value=\"Try Again\">
</form>
");
}else{
$a1 = $_POST['message_contentl'];
$a2 = $_GET['fromF'];
$a3 = $_GET['toF'];
mysql_query("INSERT INTO Friends (fr_message, From, To) VALUES ('$a1', '$a2', '$a3')"); OR die("Could not send the message: <br>".mysql_error());
echo "The Friend Request Was Successfully Sent!";
?>
그러나 그것은 작동하지 않습니다.
는 않는 모든 날이 오류 메시지가 줄입니다 : 당신은 당신의 SQL 구문에 오류가
을; 라인 1에서 'From', 'Extro', 'Syncro') '근처에서 사용할 올바른 구문에 대해서는 MySQL 서버 버전에 해당하는 설명서를 확인하십시오.
Help?
수 인정한다 : 작은 예를 들어 전은 absurdo? –
[MySQL에서 예약어를 테이블 또는 열 이름으로 사용하기 때문에 구문 오류가 발생할 수 있음] (http://stackoverflow.com/questions/23446377/syntax-error-due-to-using-a-reserved-word -as-a-table-or-column-name-in-mysql) –