First, we'll take a look at how to display what's in your variables. We're going to be viewing our results on a web page.
So see if you can get this script working first, because it's the one we'll be building on. Using a text editor like Notepad, or your PHP software, type the following. (You can copy and paste it, if you prefer.
But you learn more by typing it out yourself - it doesn't really sink in unless you're making mistakes!)
<html>
<head>
<title>Variables - Some Practice</title>
</head>
<body>
<?php print("It Worked!"); ?>
</body>
</html>
When you've finished typing it all, save the page as variables.php. Then Run the script. Remember: when you're saving your work, save it to the WWW folder, as explained here.
To run the page, start your browser up and type this in the address bar:
http://localhost/variables.php
If you've created a folder inside the www folder,
then the address to type in your browser would be something like: http://localhost/FolderName/variables.php
So see if you can get this script working first, because it's the one we'll be building on. Using a text editor like Notepad, or your PHP software, type the following. (You can copy and paste it, if you prefer.
But you learn more by typing it out yourself - it doesn't really sink in unless you're making mistakes!)
<html>
<head>
<title>Variables - Some Practice</title>
</head>
<body>
<?php print("It Worked!"); ?>
</body>
</html>
Software Developer Ishan |
To run the page, start your browser up and type this in the address bar:
http://localhost/variables.php
If you've created a folder inside the www folder,
then the address to type in your browser would be something like: http://localhost/FolderName/variables.php
Comments
Post a Comment