experimenting with include statements
heres a simple one for you got this code
in the php file called v (for variables) i have a variable called username
looking at the book its correct and at how w3schools dose it.
But i get a
Parse error: syntax error, unexpected T_INCLUDE in C:\xampplite\htdocs\passwordsite\include.php on line 8
Cant see what it dont work
heres a simple one for you got this code
Code:
<body>
<? php include("v.php");
echo $username;
?>
</body>
</html>
in the php file called v (for variables) i have a variable called username
Code:
<body>
<? php
//Define Variables
$username=Matthew;
$password=password1;
$greeting="Hello";
//send username to browser
echo "Username:$username<br>Password:$password";
?>
</body>
</html>
looking at the book its correct and at how w3schools dose it.
But i get a
Parse error: syntax error, unexpected T_INCLUDE in C:\xampplite\htdocs\passwordsite\include.php on line 8
Cant see what it dont work