HTML: <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Home Page for Jackie Dotson< /title> <?php include("styles1.shtml"); ?> <body> <h1> <?php include("header1.shtml");?> </h1> <h2>Welcome to My Home Page!</h2> <p>Hello, as you can see my name is John Doe. I am a junior level student attending <a href ="http://www.astate.edu">Arkansas State University</a> and majoring in Management Information Systems. I enjoy a multitude of things including American football, basketball, and outdoor activites. When I am not doing those things I am usually at the house and you can catch me on the Internet, playing a game, or something else.</p> <h2>Here are the item available on my site:</h2> <ul> <li>Personal Pages</li> <li>Class <a href="./exercises.html">Exercises</a> <li>Exams</li> <li>My GuestBook </li> </ul> <hr /> <?php include("footer1.shtml"); ?> </p> </body> </html> Like SO? Your PHP tags should start with "< ? php" (no spaces, of course" and end with "? > " (no spaces). I think I fixed that for you. You also had TWO HTML tags and an opening < ? which went on forever. Still, there is something wrong with your includes. DON'T include .shtmls, try including only HTML without tags. Man, make your life simple, dude...
Check what the version of your PHP on the server is. Figure out if you can do HTML: <?php include 'filename.txt'; ?> or <?php include("filename.txt"); ?> I won't do it all for you.
So wait a minute, to make it php you just have to use php statements and such? I don't have to wrap all of the HTML code in php elements? Like, if I added a include statement to an XHTML file, then renamed it abc.html to abc.php it would be a php file, do I have that right? Also, I noticed that this was the beginning of my page: < ?xml version="1.0" ? > < !doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns="http://www.w3.org/1999/xhtml" > Why was this removed from the php page: < ?xml version="1.0" ? > ???
NO. You don't wrap EVERYTHING in php tags. Man, where are you getting all this? Oops. I didn't notice I removed that XML tag. Sorry. ECHO? That's the function to print something to the document being parsed. To echo something out, just do the echo function, or do the = function. < ? php echo " What up, ho " ; ? > (no spaces) would show up on someone's browser as "What up, ho?". Are you even reading the manuals? Chapter 10 So is your page working?
Yeah the pages are working fine now. That is what I interpretted it as from my teacher, like I said he didn't spend tons of time on it just gave us a tidbit of php and I became interested. I apologize I am just beginning.
OK, would somebody mind doing me a favor. Our professor gave us this example site: http://www.suse1.astate.edu/~student-s/ It supposedly has XHTML and PHP pages on it but when I view the page source code, I cannot see any difference in either code. Am I missing something? We were supposed to turn the XHTML version of our pages, which I have into PHP versions but how do you do that? Also, how do I use the include for files that are not in the same directory as the file I am trying to use them in?