How to Make a Simple Counter Using PHP

In this tutorial I will give you a script on how to make a counter using php. That counter is the number of visitors coming to our web page, well here I will share the script. Here are the steps:
1. Open Macromedia Dreamweaver or the like
2. Enter the script below.




3. Save the file with the name counter.php.
4. If you have a xampp server, then use the url address localhost
5. Log into your browser then create the url address like this: http://localhost.counter.php
6. So the results as shown below :



Please download the script more detail below.
May be useful




How to Make Uploaded Without Reloading

Okay blogger friends this time I gave the script to upload a file without going through the database. For example, when you're changing your profile picture on facebook. In the tutorial explains how it works. Friends of all for the sake of web security jQuery does not allow submitting the form that has enctype multipart / form-data directly using Ajax Post later, $ _FILES will not be recognized. Instead jQuery plugin jquery.iframe provide post-form.js Here I give an example of a simple application of pluginiframe-post-form which will be used to upload an image file (* gif, * jpg, * png or jpeg *). The upload process can take place without having to reload the browser page. because the script is equipped with a simple capital jquery.simplemodal.js for uploading animated displays as a sign that the upload process is underway. much like we upload pictures on facebook.

SENTENCE REPETITION

      Okay. ,. This time I gave a tutorial on perulangan.Php has a function to repeat a word or phrase as a predetermined or not. At least, there are three types of commonly used methods of repetition. Here we discuss one by one:

  1. repetition FOR


FOR is a form of repetition to repeat a word or command with the number of repetitions that are already known or determined.
The following general form:
FOR (early; Events; additions)
{
The code will be on the run
}

Here I give you an example. ,.
Give pengulangan.php file name, then copy the following script:

<?
echo "Repetition FOR";
for ($ try = 1; $ try <= 10; $ try + +) {
echo "$ try";
}
?>
Then, enter the URL address of your browser, the following address:
http://localhost/pengulangan.php
It will appear like this:




  2. While repetition

While a function is also used to repeat a perinta. It's just that distinguishes it for, is to command the final value is not known. So to conclude while functioning as a command to run continuously for the condition is true.

The following general form:
While (condition) {
Code to be executed;
}

Here I give an example and create the code name while.php:
<?
$ try = 1;
while ($ try <= 10) {
echo "number. $ trying Reviews";
$ try + +;
}
?>

Then, enter the URL address of your browser, the following address:
http://localhost/while.php
It will appear like this:



3. Repetition Do ... While

Do ... while function to execute a command only in the right conditions, and will be stopped if the condition is false.
The following general form:
While (condition)
do {
Code to be executed
}

Here I will give an example and give the file name dowhile.php:
<?

$ try = 1;
do {
echo "$ number try Repetition Reviews";
$ try + +;
}
while ($ try <= 10);
$ stop = 10;
do {
echo "Repetition Reviews will stop if the condition is false";
$ stop + +;
}
while ($ stop <= 8);

?>

Then, enter the URL address of your browser, the following address:
http://localhost/dowhile.php
It will appear like this:


So first tutorial I give may be useful.

PROCEDURE TO CHANGE DATA

      To change the data in the table, the following steps:

1. Log in to MySQL SERVER
    • This function is used:
Mysql_connect ();
Example: mysql_connect ("localhost", "root", "");

    • To keep the value of the function can be invoked over the connection and use hold its value, then the above command put into a variable. The results are as follows (in the example the variable variable named "connection"):

$ connection = mysql_connect ("localhost", "root", "");

2. Activate / select the database that will be used
    • To activate / select the database to be used, its function is:
Mysql_select_db ("namadatabaseanda");


3. Perform query (UPDATE)
   • Functions are used:
Mysql_query ()

SQL Query command to change the data into the table:
Update [nama_table] SET [field1 = new nilai_field1],
[field2 = new nilai_field2],
[field n = nilai_fieldn new]
Where [condition];

May be useful   > _ <