PHP中存在解析错误

时间:2017-01-21 20:00:39

标签: php html web-development-server

浏览器中显示的错误是:

  

解析错误:第19行/Library/WebServer/Documents/portal/page4.php中的解析错误

<?php
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "password", "demo");

// Check connection
if($link === false){
    die("ERROR: Could not connect. " . mysqli_connect_error());
}

 $name  = $_POST["name"];

// Attempt select query execution
$sql = "SELECT * FROM portal WHERE full_name='$name'";

$result = mysql_query($sql);
echo .$result.;

// Close connection
mysqli_close($link);
?>

1 个答案:

答案 0 :(得分:0)

更改此

echo .$result.;

到这个

echo $result;