Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP Help
#1
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
[Image: chaosthegreat.png]
Reply
#2
(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]
Reply
#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
#4
I hope this works.
[Image: chaosthegreat.png]
Reply
#5
I thought you were an advance coder?
I'm kind of on that level, I study something new everyday on w3schools.
Hello
Reply
#6
I am pretty advanced. I just got stuck in that little jut. If you want, I can show you some of my projects. I made a working calculator, forum, and other things.

It's really the website things that get me stuck with the CSS and HTML. I'm pretty good at making little gadgets for sites.
[Image: chaosthegreat.png]
Reply
#7
Sure, I'd like to see.
Hello
Reply
#8
I just posted one in this section.
[Image: chaosthegreat.png]
Reply
#9
(07-15-2011, 08:10 PM)Chaos Wrote: I am pretty advanced. I just got stuck in that little jut. If you want, I can show you some of my projects. I made a working calculator, forum, and other things.

No offense but, many people wouldn't call that stuff very advanced... it's still cool, but just be careful when you call yourself an experienced programmer...
Reply
#10
(07-16-2011, 06:34 AM)noob007 Wrote:
(07-15-2011, 08:10 PM)Chaos Wrote: I am pretty advanced. I just got stuck in that little jut. If you want, I can show you some of my projects. I made a working calculator, forum, and other things.

No offense but, many people wouldn't call that stuff very advanced... it's still cool, but just be careful when you call yourself an experienced programmer...

What would you consider advanced?
Hello
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)