- <html>
- <head>
- <title>My Index</title>
- </head>
- <body>
- <div style="background-color: #CECECE;">
- <p>My Text... blah blah blah</p>
- </div>
- <?php
- //including text.html
- include('text.html');
- ?>
- </body>
- </html>
Forum rules
Please read our Guide to Making Ozzu Tutorials if you would like to submit your own tutorials.
TUTORIAL: Learning PHP (Part 1)
Learning PHP - Part 1
This tutorial is aimed at people with no knowledge of PHP (and some in HTML) and who would want to learn what PHP is and to learn the wonderful language of PHP
PHP stands for "PHP Hypertext Preprocessor". It is a server-side language that enables the programmer to do a lot of the functions the power of PHP enables you to.
Forums and blogs are created, implemented and used by PHP. People use PHP to create forms, and even hole web sites. A database driven dynamic web site. That is something to think about. Easy to create after a hard work of creating the site. Also leaves the person with euphoria of good accomplishment.
*PHP has being used by many people by the time of it's creation in and was named as PHP/FI which went all the way to it's 2nd stage, and then it was succeeded by PHP 3.0. Now people use the more modern PHP 5 with much more functions than the previous stages of PHP. Read the History of PHP To find out more of the history of PHP.
PHP is a free language that was made for the web so programmers could use it as they see fit anywhere and anytime.
Although PHP is a powerful language, it could be hacked if you use it the wrong way.
The objective of these tutorials is to teach a complete beginner at PHP to learn the language of PHP.
If you decide to create a PHP file provided in this tutorial, you would need to know how to be able to save and open the PHP file. You can code in Notepad,
but I usually like to use HTML-KIT with the PHP Plug-In installed. But the PHP editor (if you choose to use one) is up to your choice and preference. You can even use Notepad 2 with your own costume syntax highlighting.
Well, once you create a file, to save it you want to use the extension of PHP. If you use Notepad, you would want to change "File Type" to "All Files" and than save the file as "*.php" without the quotes (and the asterisk
).
To open the PHP file and see the results, you would need either of the two things...
).
Once you install wamp, you would need to go (by default in Windows) to C:\wamp\www and create a folder in there. That folder could be named anything. But for the purpose of this tutorial, just name it as "phpTutorial" without the quotes. You would be saving your PHP files in that folder. Everything in the "www" folder would be accessible to you (meaning you would be able to view the contents using WAMP).
When you get PHP files in there you would be opening that file by going to your browser and typing "localhost" or "127.0.0.1" in the address bar and under projects clicking "phpTutorial" and then clicking on the PHP file(s)...
On your local server, PHP should be enabled by default.
Just like any other language, PHP has starting tags as well. They are...
You put all of the PHP tags inside of those tags. The simplest "tag" about PHP that you will learn right now would be to create comments in PHP files.
There are two ways you can create a comment in PHP. One way is for big lines of text and another one is for short description text.
Comments for big lines of text...
Of course, the comments you create in the PHP file wouldn't be seeing by the public. Even if they check the source of your page. PHP comments are hidden from view entirely (and so is the code).
Comments for short text...
It is recommended to use the comment for big lines of text especially for that... for big lines of text. The other one is used only for one line of text and no longer. The comments are handy when you would need to know what code goes to what code and what they are for and what they do. It helps many programmers who are using comments.
By "echo" I mean to print the text you put into the code and make it viewable to the public.
PHP uses "echo" to paste text into the screen. You can also store the text into variables and than echo the variables. That comes handy when you need to reuse a line of text on your site over and over again that are universal and change all the time. That way, you edit the PHP file and change the text stored into the echo command and you would be able to change all of those reused words/text in one shot. Below is a simple example of storing a text into a variable and then echoing it.
That would show "Hello World" on your screen when you open that PHP file in your browser.
There is another command that works the same way as echo. Exactly the same way. That is the "print" command. Just change the "echo" to "print" in the above example, and you would get the same result.
Explanation of the code...
The "$text" is the variable. The variable name is "text" and the variable name should also come after the dollar sign "$". In PHP the dollar sign tells the PHP parser that the text right after it, is the variable. The text in between " '...' " and the equal sign "=" is the text that should be stored in the variable, so it could reuse the same text throughout. You can echo the same variable more than once in a PHP file.
You don't have to store the text into a variable and echo the text. You can simply echo the text such as below.
As you might notice, all of the commands are closed with a semi-colon ";". That is to tell the PHP parser when to stop parsing the PHP of that particular function, string or command. If you don't close the PHP functions, strings or commands you would get a PHP error just as you would mess up your layout if you didn't close an HTML tag.
On echo command you don't need the equal sign. If you do use the equal sign, you would get an error and it won't work. You can try it out just to see what it would do.
You can also store HTML into variables and echo HTML tags as well... Below is a simple example of storing an HTML tag and echoing an HTML tag...
If your HTML has the "single-quotes" just like your PHP does you would need to escape those quotes with a backslash "\".
That is to tell the PHP parser that those quotes don't mean to end the PHP lines from being PHP or to start them. If you are using a different type of quotes for your PHP, than you don't need to escape them.
The only reason you escape the quotes is when the HTML quotes are the same as PHP quotes that you are using. (You don't necessarily need to use the "single-quote" for PHP.
You can also store variables into variables if you like. There is no real use for that, but you can do it... below is a simple example of such thing...
Sometimes that could get strenuous or too hard if you want to pass a variable over multiple pages. Like through 3+ pages. There are some solutions for that though, but before we get to it, let us set up a simple HTML form with a METHOD of "post" and an ACTION of "form.php".
Once (and if) you finished typing that, save that file as "form.php" without the quotes and you would be ready to go with the PHP side of the form.
Usually, people call the "php side of the form" as the "form validation" so that is what we will call it here. But we will keep the validation simple and add to it as we go throughout the tutorial. We will first use what we know in the form validation, but before we do that, we have to learn how to insert the submitted data into a variable.
"Pname" above is the name of the field that the user submitted. In the HTML form we wrote above, you would notice that the attribute "name" is "Pname". That is telling the PHP to look for an input or some data source with the name of "Pname". The name of it could be anything. So if you want, you can change the "Pname" to anything you like... if you do, don't forget to change PHP and HTML and make them the same.
The "$_POST" tells the PHP what kind of method you used. The two methods you can use are "get" and "post". "Get" sends the information through the URL and "post" sends the information to the url. You can echo the name that the person submitted with the echo statement...
That is as simple as that. If you put that PHP in the same page as you put the HTML form in (should be form.php if you saved the file) you would be able to submit your name and see the result. You can have some text to go along with your name... such as below example...
You will notice the way that it is set up. The variable is behind the "single quotes" and behind the dot. The dot basically tells the PHP parser that there is more after the single quotes to parse. The reason that the variable is behind the single quotes is because the variable is not a string. Just about anything that is inside the single quotes, it means that it is a string. (Just to note, you can use regular quotes if you like " " ").
The same process would be used it you would like to pass that variable to another page. All you have to do is put the PHP into another page and save that page as a PHP and have that page's url put into the "action" attribute in the form. It is best practice to do it that way. To separate the PHP from HTML, a lot of programmers do it that way.
For example, here is form.php (could be form.html now, since there is no PHP in it).
And below is form2.php.
It is that simple. Not tough at all.
Oh, and if you want some text after the variable it would be the same way as you did it before the variable...
If...elseif...else statements are actually really easy to use and implement. There are many different commands you can use in them and operators to check if certain values or statements are true or false and what to do in each case.
To get a hang of else...elseif...else statement lets do the following simple example using this...
Of course, that code would echo "It is the letter "a"" because the variable "$a" has the letter "a" stored in it (after the equal sign).
Lets do a simple check if the form in our example has being filled in completely or left blank by using the command "empty()".
As you will notice, the echo statement which tells the PHP parser to print (or echo) the name submitted is inside the if...else statement. You don't have to have the elseif statement in it. All it is, is just setting another scenario for the PHP parser. Else means the opposite of what if is describing.
The command "empty()" checks if the variable is empty of any information or not. The variable has the information stored in it that you have submitted in the form.
Everything that you want to do if the scenario proves to be true should go in brackets " {...} " (as in example). If you really need to, you can have an if statement inside an if statement, but in this tutorial you don't need to do that (yet).
This statement is used in many validators and is popular throughout the web. There are some short hands for this, but we will go into them later on in the series.
All the else...elseif...else statement says is, "if this is like that than say this, else if this is like those than say this, else just say that" or in other words "if this is like this, that say that, or if it's like that than say this, otherwise say this". Not a really hard statement to learn. One of the first PHP statements that I learned.
You might notice that some text on your PHP validation may show even before you press "submit" and send in your values. That could be taken care of easily with some simple PHP script.
All that piece of code is saying if the submit button is set (isset) (or pressed) than show the form validation. Isset checks if the variable has anything stored in it, and if it does, than it would be parsed as TRUE, and in this example, if it is true, than it WILL show the information. So once you press the submit button, you are storing a bit of information in it, making the [u]isset[/b] true and because of that, you will be shown the form validation.
So, if you implement this code into our simple tutorial, the form validation would look like the following.
It is a good practice to keep the code organized and well commented. Makes it easier for you in the future to edit the PHP to fit your needs. We will go more into depth on form validation later on.
Including other file into each other is a rather simple thing to do. This way, you can include one file into another without using the dreaded HTML frames or iframes. Nobody needs those annoying frames or iframes. The only difference in include command is that it parses the information in the file that is being included into another file as it is part of the file that the other file is being included into (:lol: understand it?).
Lets take the following example for a simple explanation.
Let say that text.html is being included into index.php. Lets say that the source code for index.php is...
And the source code for text.html would be...
This thing is also useful in forms. This way you can have the validation show up in the same page that your form is on but the validation is actually on a different page. Lets implement this on our form example. Let the source for form.php be...
And lets have the following source for form2.php...
As you might notice, the form ACTION is form.php but the validation is on form2.php. Why? Well, we are including the PHP into form.php and we would want the form validation to be shown where the HTML form is... for ease to the user. This way, users can see which fields they have not filled in correctly and fix it while looking at the mistakes they have made.
There are other simple and similar ways to do the same ways, yet they have a little bit different "features" to them. They are...
The same rules go with require and require_once except that this time, if the file that it is supposed to require is not found, the page will not load and an error would be brought up. Everything in front of the require or require_once would be shown but everything behind it would not. That is if the file that is supposed to be required is not found.
At requirement, it includes it as well... if you put require and include at the same time, it would require it (and include because it is require) and include it so you will have two of the same things right by each other.
In conclusion of this tutorial, you learned how to code a simple form and how to create a simple form validation for it.
As you see, PHP is a powerful language that empowers you to do many things with it if you learn to use it well.
--------------------------------------------------
Go to part 2 ->
If you got any suggestions, please PM me
Introduction
This tutorial is aimed at people with no knowledge of PHP (and some in HTML) and who would want to learn what PHP is and to learn the wonderful language of PHP
What is PHP?
PHP stands for "PHP Hypertext Preprocessor". It is a server-side language that enables the programmer to do a lot of the functions the power of PHP enables you to.
Forums and blogs are created, implemented and used by PHP. People use PHP to create forms, and even hole web sites. A database driven dynamic web site. That is something to think about. Easy to create after a hard work of creating the site. Also leaves the person with euphoria of good accomplishment.
*PHP has being used by many people by the time of it's creation in and was named as PHP/FI which went all the way to it's 2nd stage, and then it was succeeded by PHP 3.0. Now people use the more modern PHP 5 with much more functions than the previous stages of PHP. Read the History of PHP To find out more of the history of PHP.
PHP is a free language that was made for the web so programmers could use it as they see fit anywhere and anytime.
Although PHP is a powerful language, it could be hacked if you use it the wrong way.
Objectives of this tutorial
The objective of these tutorials is to teach a complete beginner at PHP to learn the language of PHP.
Saving and Opening PHP Files
If you decide to create a PHP file provided in this tutorial, you would need to know how to be able to save and open the PHP file. You can code in Notepad,
but I usually like to use HTML-KIT with the PHP Plug-In installed. But the PHP editor (if you choose to use one) is up to your choice and preference. You can even use Notepad 2 with your own costume syntax highlighting.
Well, once you create a file, to save it you want to use the extension of PHP. If you use Notepad, you would want to change "File Type" to "All Files" and than save the file as "*.php" without the quotes (and the asterisk
To open the PHP file and see the results, you would need either of the two things...
- A host with PHP enabled
- A local server installed on your computer
Once you install wamp, you would need to go (by default in Windows) to C:\wamp\www and create a folder in there. That folder could be named anything. But for the purpose of this tutorial, just name it as "phpTutorial" without the quotes. You would be saving your PHP files in that folder. Everything in the "www" folder would be accessible to you (meaning you would be able to view the contents using WAMP).
When you get PHP files in there you would be opening that file by going to your browser and typing "localhost" or "127.0.0.1" in the address bar and under projects clicking "phpTutorial" and then clicking on the PHP file(s)...
On your local server, PHP should be enabled by default.
Using PHP
Just like any other language, PHP has starting tags as well. They are...
You put all of the PHP tags inside of those tags. The simplest "tag" about PHP that you will learn right now would be to create comments in PHP files.
There are two ways you can create a comment in PHP. One way is for big lines of text and another one is for short description text.
Comments for big lines of text...
Code: Select all
- <?php
- /* This is a comment that can hold big lines of text. By "lines" I mean multiple lines
- like this one. It is very handy if you want to put something descriptive about the PHP
- file that you are creating so you won't forget what that file is and what it is for. */
- ?>
Of course, the comments you create in the PHP file wouldn't be seeing by the public. Even if they check the source of your page. PHP comments are hidden from view entirely (and so is the code).
Comments for short text...
It is recommended to use the comment for big lines of text especially for that... for big lines of text. The other one is used only for one line of text and no longer. The comments are handy when you would need to know what code goes to what code and what they are for and what they do. It helps many programmers who are using comments.
Variables and echoes
By "echo" I mean to print the text you put into the code and make it viewable to the public.
PHP uses "echo" to paste text into the screen. You can also store the text into variables and than echo the variables. That comes handy when you need to reuse a line of text on your site over and over again that are universal and change all the time. That way, you edit the PHP file and change the text stored into the echo command and you would be able to change all of those reused words/text in one shot. Below is a simple example of storing a text into a variable and then echoing it.
Code: Select all
- <?php
- //storing "Hello World" into $text
- $text = 'Hello World';
- //Echoing $text to print "Hello World"
- echo $text;
- ?>
That would show "Hello World" on your screen when you open that PHP file in your browser.
There is another command that works the same way as echo. Exactly the same way. That is the "print" command. Just change the "echo" to "print" in the above example, and you would get the same result.
Explanation of the code...
The "$text" is the variable. The variable name is "text" and the variable name should also come after the dollar sign "$". In PHP the dollar sign tells the PHP parser that the text right after it, is the variable. The text in between " '...' " and the equal sign "=" is the text that should be stored in the variable, so it could reuse the same text throughout. You can echo the same variable more than once in a PHP file.
You don't have to store the text into a variable and echo the text. You can simply echo the text such as below.
As you might notice, all of the commands are closed with a semi-colon ";". That is to tell the PHP parser when to stop parsing the PHP of that particular function, string or command. If you don't close the PHP functions, strings or commands you would get a PHP error just as you would mess up your layout if you didn't close an HTML tag.
On echo command you don't need the equal sign. If you do use the equal sign, you would get an error and it won't work. You can try it out just to see what it would do.
You can also store HTML into variables and echo HTML tags as well... Below is a simple example of storing an HTML tag and echoing an HTML tag...
Code: Select all
If your HTML has the "single-quotes" just like your PHP does you would need to escape those quotes with a backslash "\".
That is to tell the PHP parser that those quotes don't mean to end the PHP lines from being PHP or to start them. If you are using a different type of quotes for your PHP, than you don't need to escape them.
The only reason you escape the quotes is when the HTML quotes are the same as PHP quotes that you are using. (You don't necessarily need to use the "single-quote" for PHP.
You can also store variables into variables if you like. There is no real use for that, but you can do it... below is a simple example of such thing...
Code: Select all
- <?php
- //Storing "some text" into a $variable
- $variable = 'some text';
- //storing $variable into $variable2
- $variable2 = $variable;
- //Echoing $variable2
- echo $variable2;
- //You would see "some text" (without the quotes) on your screen
- ?>
Passing variables from page to page
Sometimes that could get strenuous or too hard if you want to pass a variable over multiple pages. Like through 3+ pages. There are some solutions for that though, but before we get to it, let us set up a simple HTML form with a METHOD of "post" and an ACTION of "form.php".
Code: Select all
Once (and if) you finished typing that, save that file as "form.php" without the quotes and you would be ready to go with the PHP side of the form.
Usually, people call the "php side of the form" as the "form validation" so that is what we will call it here. But we will keep the validation simple and add to it as we go throughout the tutorial. We will first use what we know in the form validation, but before we do that, we have to learn how to insert the submitted data into a variable.
Code: Select all
- <?php
- //inserting the name into a variable
- $name = $_POST['Pname'];
- ?>
"Pname" above is the name of the field that the user submitted. In the HTML form we wrote above, you would notice that the attribute "name" is "Pname". That is telling the PHP to look for an input or some data source with the name of "Pname". The name of it could be anything. So if you want, you can change the "Pname" to anything you like... if you do, don't forget to change PHP and HTML and make them the same.
The "$_POST" tells the PHP what kind of method you used. The two methods you can use are "get" and "post". "Get" sends the information through the URL and "post" sends the information to the url. You can echo the name that the person submitted with the echo statement...
Code: Select all
- <?php
- //inserting the name into a variable
- $name = $_POST['Pname'];
- //echoing the name
- echo $name;
- ?>
That is as simple as that. If you put that PHP in the same page as you put the HTML form in (should be form.php if you saved the file) you would be able to submit your name and see the result. You can have some text to go along with your name... such as below example...
Code: Select all
- <?php
- //inserting the name into a variable
- $name = $_POST['Pname'];
- //echoing the name
- echo 'Your name is: '. $name;
- ?>
You will notice the way that it is set up. The variable is behind the "single quotes" and behind the dot. The dot basically tells the PHP parser that there is more after the single quotes to parse. The reason that the variable is behind the single quotes is because the variable is not a string. Just about anything that is inside the single quotes, it means that it is a string. (Just to note, you can use regular quotes if you like " " ").
The same process would be used it you would like to pass that variable to another page. All you have to do is put the PHP into another page and save that page as a PHP and have that page's url put into the "action" attribute in the form. It is best practice to do it that way. To separate the PHP from HTML, a lot of programmers do it that way.
For example, here is form.php (could be form.html now, since there is no PHP in it).
Code: Select all
And below is form2.php.
Code: Select all
- <?php
- //inserting the name into a variable
- $name = $_POST['Pname'];
- //echoing the name
- echo 'Your name is: '. $name;
- ?>
It is that simple. Not tough at all.
Oh, and if you want some text after the variable it would be the same way as you did it before the variable...
Code: Select all
- <?php
- //inserting the name into a variable
- $name = $_POST['Pname'];
- //echoing the name
- echo 'Your name is: '. $name .'We hope that you enjoy your stay here.';
- ?>
If...elseif...else statements
If...elseif...else statements are actually really easy to use and implement. There are many different commands you can use in them and operators to check if certain values or statements are true or false and what to do in each case.
To get a hang of else...elseif...else statement lets do the following simple example using this...
Code: Select all
- <?php
- ///Simple else...elseif...else statement
- //The variable $a is a
- $a = a;
- if($a == a)
- {
- //if $a is a than echo the following...
- echo 'It is the letter "a"';
- }
- elseif($a == b)
- {
- //if $a is b than echo the following...
- echo 'It is the letter "b"';
- }
- else
- {
- //if $a is not a or b echo the following...
- echo 'I can't figure what it is';
- }
- //You know what $a is... right?
- ?>
Of course, that code would echo "It is the letter "a"" because the variable "$a" has the letter "a" stored in it (after the equal sign).
Lets do a simple check if the form in our example has being filled in completely or left blank by using the command "empty()".
Code: Select all
- <?php
- //Setting the variables
- $name = $_POST['Pname'];
- //Checking if the input field has being filled in
- if(empty($name))
- {
- //If the variable $name is empty, echo the following...
- echo 'You need to fill in the input field with your name.';
- } else {
- //If the variable $name is filled in, echo the following...
- echo 'Your name is: '. $name;
- }
- ?>
As you will notice, the echo statement which tells the PHP parser to print (or echo) the name submitted is inside the if...else statement. You don't have to have the elseif statement in it. All it is, is just setting another scenario for the PHP parser. Else means the opposite of what if is describing.
The command "empty()" checks if the variable is empty of any information or not. The variable has the information stored in it that you have submitted in the form.
Everything that you want to do if the scenario proves to be true should go in brackets " {...} " (as in example). If you really need to, you can have an if statement inside an if statement, but in this tutorial you don't need to do that (yet).
This statement is used in many validators and is popular throughout the web. There are some short hands for this, but we will go into them later on in the series.
All the else...elseif...else statement says is, "if this is like that than say this, else if this is like those than say this, else just say that" or in other words "if this is like this, that say that, or if it's like that than say this, otherwise say this". Not a really hard statement to learn. One of the first PHP statements that I learned.
Hiding validation until SUBMIT button is pressed
You might notice that some text on your PHP validation may show even before you press "submit" and send in your values. That could be taken care of easily with some simple PHP script.
All that piece of code is saying if the submit button is set (isset) (or pressed) than show the form validation. Isset checks if the variable has anything stored in it, and if it does, than it would be parsed as TRUE, and in this example, if it is true, than it WILL show the information. So once you press the submit button, you are storing a bit of information in it, making the [u]isset[/b] true and because of that, you will be shown the form validation.
So, if you implement this code into our simple tutorial, the form validation would look like the following.
Code: Select all
- <?php
- if(isset($_POST['submit']))
- {
- //Setting the variables
- $name = $_POST['Pname'];
- //Checking if the input field has being filled in
- if(empty($name))
- {
- //If the input field (the variable) is empty, then echo...
- echo 'You need to fill in the input field with your name.';
- } else {
- //Otherwise echo...
- echo 'Your name is: '. $name;
- }
- }
- ?>
It is a good practice to keep the code organized and well commented. Makes it easier for you in the future to edit the PHP to fit your needs. We will go more into depth on form validation later on.
Includes and requirements
Including other file into each other is a rather simple thing to do. This way, you can include one file into another without using the dreaded HTML frames or iframes. Nobody needs those annoying frames or iframes. The only difference in include command is that it parses the information in the file that is being included into another file as it is part of the file that the other file is being included into (:lol: understand it?).
Lets take the following example for a simple explanation.
Let say that text.html is being included into index.php. Lets say that the source code for index.php is...
Code: Select all
And the source code for text.html would be...
Code: Select all
This thing is also useful in forms. This way you can have the validation show up in the same page that your form is on but the validation is actually on a different page. Lets implement this on our form example. Let the source for form.php be...
Code: Select all
- <?php
- include('form2.php');
- ?>
- <form action="form.php" method="post">
- Name: <input type="text" name="Pname" />
- <input type="submit" name="submit" value="submit" />
- </form>
And lets have the following source for form2.php...
Code: Select all
- <?php
- if(isset($_POST['submit']))
- {
- //Setting the variables
- $name = $_POST['Pname'];
- //Checking if the input field has being filled in
- if(empty($name))
- {
- //If the input field (the variable) is empty, then echo...
- echo 'You need to fill in the input field with your name.';
- } else {
- //Otherwise echo...
- echo 'Your name is: '. $name;
- }
- }
- ?>
As you might notice, the form ACTION is form.php but the validation is on form2.php. Why? Well, we are including the PHP into form.php and we would want the form validation to be shown where the HTML form is... for ease to the user. This way, users can see which fields they have not filled in correctly and fix it while looking at the mistakes they have made.
There are other simple and similar ways to do the same ways, yet they have a little bit different "features" to them. They are...
- include
- include_once
- require
- require_once
The same rules go with require and require_once except that this time, if the file that it is supposed to require is not found, the page will not load and an error would be brought up. Everything in front of the require or require_once would be shown but everything behind it would not. That is if the file that is supposed to be required is not found.
At requirement, it includes it as well... if you put require and include at the same time, it would require it (and include because it is require) and include it so you will have two of the same things right by each other.
Conclusion
In conclusion of this tutorial, you learned how to code a simple form and how to create a simple form validation for it.
As you see, PHP is a powerful language that empowers you to do many things with it if you learn to use it well.
--------------------------------------------------
Go to part 2 ->
If you got any suggestions, please PM me
Guys, I need help with Wedevoy.com here. Thanks.
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
March 14th, 2008, 11:28 pm
- yomi
- Newbie


- Joined: 02 Apr 2008
- Posts: 14
- Status: Offline
- panther786
- Newbie


- Joined: 19 Apr 2008
- Posts: 6
- Status: Offline
yomi wrote:
hi
came across thiese library fxns in a script for paginating and i am trying to understand what they mean and what they do.
include 'library/config.php';
include 'library/opendb.php';
came across thiese library fxns in a script for paginating and i am trying to understand what they mean and what they do.
include 'library/config.php';
include 'library/opendb.php';
Config will be where your database connection is
And opendb (open database) is where your database is selected.
Page 1 of 1
To Reply to this topic you need LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 4 posts
- Moderator: Moderator Team
- Users browsing this forum: No registered users and 1 guest
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum


