-3

The Error shown in Browser is:

Parse error: parse error in /Library/WebServer/Documents/portal/page4.php on line 19

<?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);
?>
chris85
  • 23,846
  • 7
  • 34
  • 51
  • 1
    `mysql_query` doesnt work with `mysqli`. You also are open to SQL injections. See http://stackoverflow.com/questions/17498216/can-i-mix-mysql-apis-in-php and http://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php – chris85 Jan 21 '17 at 20:05
  • You need to please REVISE THIS AS A QUESTION, your about to get an onslaught of downvotes otherwise. Dont ask us to just do your work your you. – blamb Jan 21 '17 at 20:06

1 Answers1

0

Change this

echo .$result.;

to this

echo $result;
sT0n3
  • 125
  • 2
  • 13