OK, this is as basic a question as any of you will get on this site. Here's the deal. I have a very basic PHP file saved, of course, as php. I have an HTML page built in Dreamweaver. So, how do I include that file in the HTML so that it is executed? The PHP file is a simple Hello World (I told you this was basic).
<php?
print("Hello World!");
php?>
Pretty simple stuff I know. But I don't know what I have to do or where I have to place this file within the HTML to get it to execute. I'm just getting a blank page. If someone could give me an example of what the HTML looks like with a php file, that would be great. Thanks in advance.
pallen 0 Light Poster
Recommended Answers
Jump to PostThis is what I have in the body of my doc (I didn't include the head because it doesn't seem relevant):
<body> <php? echo "Hello World. You suck!"; ?> </body>
OK, but:
a. The name of the file need to end in ".php"
b. You MUST use the …
Jump to PostHmmm... are you still having that problem? When I go to http://haciendocoro.com/PHP_Info.php I can see the text printed out.
You need to have a "<?php" tag before you start your php code and "?>" at the end of your php code.
W3Schools is a great …
Jump to Posthow to make a text box in php and button?When the button click,appear the new web page
you can doit without php... if you want to go to X page that was wrote in the txt, you can use JavaScript, example:
<html> <head> <title>JavaScript</title> <script type="text/javascript"> function …
Jump to Posthow about using php?the textbox and the button.
for that:
<html> <head> <title>Your title</title> </head> <body> <? if($_SERVER['REQUEST_METHOD']=="POST"){ echo "<meta http-equiv='Refresh' content=\"2; url='http://".$_POST['page']."'\"/>"; } ?> <form id="form1" method="post" action=""> <input type="text" name="page" id="page" /> <input name="button" type="submit" /> </form> </body> </html>
Jump to Post@Mickey23: Please don't hijack someone else's thread with irrelevant questions. Make your own threads...
All 24 Replies
benhowdle89 0 Junior Poster in Training
pallen 0 Light Poster
dietdew12z 8 Junior Poster
pallen 0 Light Poster
benhowdle89 0 Junior Poster in Training
dietdew12z 8 Junior Poster
pallen 0 Light Poster
pallen 0 Light Poster
pallen 0 Light Poster
steelshark 0 Junior Poster in Training
pallen 0 Light Poster
benhowdle89 0 Junior Poster in Training
benhowdle89 0 Junior Poster in Training
pallen 0 Light Poster
steelshark 0 Junior Poster in Training
hielo 65 Veteran Poster
deathscarz 0 Newbie Poster
baltazar 0 Light Poster
mickey23 0 Newbie Poster

P0lT10n
mickey23 0 Newbie Poster
mickey23 0 Newbie Poster

P0lT10n
Lsmjudoka 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.