Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP Help
#3
(07-14-2011, 02:52 AM)Jacob_ Wrote:
(07-14-2011, 02:25 AM)Chaos Wrote: Code name: blog.php

[lua]

<?php
<html>
include("header.php");
echo "<link href="style.css" rel="stylesheet" type="text/css">";
echo "<center><p>------------------------------------------------------------------------------------</p></center><p><center>";
echo "<p>Posted July 7th, 2011:</p>";
echo "<p>Hello my name is Matt, but just call me chaos. If you have in fact stumbled across</p>";
echo "<p>this site then you have no real reason to be on here. Maybe you just want to check out</p>";
echo "<p>my progress since this is simply a practice site getting me ready for the real world!</p>";
include("footer.php");
</html>
?>
[/lua]

ERROR:
Parse error: syntax error, unexpected '<' in /home/a1555635/public_html/blog.php on line 2
You have the <html> tags inside the PHP tags without echo statements, I'm guessing that's just an accident though.

And if you use double quotes in a string surrounded by double quotes, or single quotes in a string with single quotes, you have to put backslashes before them.

Also, did you know you can mix HTML and PHP in one file? It's a lot easier that way:
[lua]
<html>
<?php
include("header.php");
?>
<link href="style.css" rel="stylesheet" type="text/css">
<center><p>------------------------------------------------------------------------------------</p></center><p><center>
<p>Posted July 7th, 2011:</p>";
<p>Hello my name is Matt, but just call me chaos. If you have in fact stumbled across</p>
<p>this site then you have no real reason to be on here. Maybe you just want to check out</p>
<p>my progress since this is simply a practice site getting me ready for the real world!</p>
<?php
include("footer.php");
?>
</html>
[/lua]

That's what I told him lol
[Image: AmZJnA9.png]
Reply


Messages In This Thread
PHP Help - by Chaos - 07-14-2011, 02:25 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)