<< < 3 4 5 6 7 8 9 10 11 > >>   Sort: Date

How To Retrieve Values from the Current Session
How To Retrieve Values from the Current Session? - PHP Script Tips - Understanding and Using Sessions If you know some values have been saved in the session by an other script requested by the same visitor, you can retrieve those values back by using the pre-defined associative array called $_SESSIO...
2007-04-18, 4715👍, 0💬

How To Create an Array
How To Create an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations You can create an array using the array() constructor. When calling array(), you can also initialize the array with pairs of keys and values. Here is a PHP script on how to use array(): &lt;?php print...
2007-04-20, 4712👍, 0💬

How To Select an Exiting Database
How To Select an Exiting Database? - MySQL FAQs - PHP Connections and Query Execution The first thing after you have created a connection object to the MySQL server is to select the database where your tables are located, by using the mysql_select_db() function. If your MySQL server is offered by yo...
2007-05-10, 4707👍, 0💬

How To Define a User Function
How To Define a User Function? - PHP Script Tips - Creating Your Own Functions You can define a user function anywhere in a PHP script using the function statement like this: "function name() {...}". Here is a PHP script example on how to define a user function: &lt;?php function msg() { print("...
2007-04-24, 4706👍, 0💬

How To Specify Input Values for Checkboxes
How To Specify Input Values for Checkboxes? - PHP Script Tips - Processing Web Forms Checkboxes can be used in a form for two situations: As a single switch - One &lt;INPUT TYPE=CHECKBOX ...> tag, with no input value specified. When submitted with button pushed down, you will receive a value of ...
2007-04-23, 4702👍, 0💬

How Does FireFox Manage Cookies
How Does FireFox Manage Cookies? - PHP Script Tips - Understanding and Managing Cookies FireFox browser allows you to delete old cookies, and gives you options to keep persistent cookies in cookie files until they reach their expiration time. The following tutorial shows you how to manage cookies in...
2007-04-24, 4698👍, 0💬

Can You Select Someone Else Database
Can You Select Someone Else Database? - MySQL FAQs - PHP Connections and Query Execution If your MySQL server is provided by an Internet service company, they will provide you one database for your use only. There are many other databases on the server for other users. But your user account will hav...
2007-05-10, 4696👍, 0💬

How To Access a Global Variable inside a Function
How To Access a Global Variable inside a Function? - PHP Script Tips - Creating Your Own Functions By default, global variables are not accessible inside a function. However, you can make them accessible by declare them as "global" inside a function. Here is a PHP script on declaring "global" variab...
2007-04-24, 4694👍, 0💬

How To Write a String to a File without a File Handle
How To Write a String to a File without a File Handle? - PHP Script Tips - Reading and Writing Files If you have a string, want to write it to a file, and you don't want to open the file with a file handle, you can use the file_put_contents(). It opens the specified file, writes the specified string...
2007-04-23, 4694👍, 0💬

Can You Pass an Array into a Function
Can You Pass an Array into a Function? - PHP Script Tips - Creating Your Own Functions You can pass an array into a function in the same as a normal variable. No special syntax needed. Here is a PHP script on how to pass an array to a function: &lt;?php function average($array) { $sum = array_su...
2007-04-24, 4692👍, 0💬

How To Access a Specific Character in a String
How To Access a Specific Character in a String? - PHP Script Tips - Understanding String Literals and Operations Any character in a string can be accessed by a special string element expression: $string{index} - The index is the position of the character counted from left and starting from 0. Here i...
2007-04-20, 4689👍, 0💬

What Is the Scope of a Variable Defined in a Function
What Is the Scope of a Variable Defined in a Function? - PHP Script Tips - Creating Your Own Functions The scope of a local variable defined in a function is limited with that function. Once the function is ended, its local variables are also removed. So you can not access any local variable outside...
2007-04-24, 4687👍, 0💬

How To Quote Text Values in SQL Statements
How To Quote Text Values in SQL Statements? - PHP Script Tips - Working with MySQL Database Text values in SQL statements should be quoted with single quotes ('). If the text value contains a single quote ('), it should be protected by replacing it with two single quotes (''). In SQL language syntax...
2007-04-19, 4684👍, 0💬

How To Create a Table To Store Files
How To Create a Table To Store Files? - PHP Script Tips - Uploading Files to Web Servers If you using MySQL database and want to store files in database, you need to create BLOB columns, which can holds up to 65,535 characters. Here is a sample script that creates a table with a BLOB column to be us...
2007-04-19, 4684👍, 0💬

What Do You Need to Connect PHP to MySQL
What Do You Need to Connect PHP to MySQL? - PHP Script Tips - Working with MySQL Database If you want to access MySQL database server in your PHP script, you need to make sure that MySQL module is installed and turned on in your PHP engine. Check the PHP configuration file, php.ini, to make sure the...
2007-04-18, 4681👍, 0💬

How To Join Multiple Strings into a Single String
How To Join Multiple Strings into a Single String? - PHP Script Tips - PHP Built-in Functions for Strings If you multiple strings stored in an array, you can join them together into a single string with a given delimiter by using the implode() function. Here is a PHP script on how to use implode(): ...
2007-04-21, 4677👍, 0💬

How To Receive a Cookie from the Browser
How To Receive a Cookie from the Browser? - PHP Script Tips - Understanding and Managing Cookies If you know that a cookie has been sent to the browser when it was visiting the server previously, you can check the built-in $_COOKIE array, which contains all cookies that were sent by the server previ...
2007-04-25, 4676👍, 0💬

How To Copy a File
How To Copy a File? - PHP Script Tips - Working with Directoris and Files If you have a file and want to make a copy to create a new file, you can use the copy() function. Here is a PHP script example on how to use copy(): &lt;?php unlink("/temp/myPing.exe"); copy("/windows/system32/ping.e xe","...
2007-04-23, 4676👍, 0💬

How To Select an Exiting Database
How To Select an Exiting Database? - PHP Script Tips - Working with MySQL Database The first thing after you have created a connection object to the MySQL server is to select the database where your tables are locate, by using the mysql_select_db() function. If your MySQL server is offered by your W...
2007-04-18, 4676👍, 0💬

How To Read the Entire File into a Single String
How To Read the Entire File into a Single String? - PHP Script Tips - Reading and Writing Files If you have a file, and you want to read the entire file into a single string, you can use the file_get_contents() function. It opens the specified file, reads all characters in the file, and returns them...
2007-04-22, 4675👍, 0💬

How To Install MySQL
How To Install MySQL? - PHP Script Tips - Working with MySQL Database MySQL is an open source database management system developed by MySQL AB, http://www.mysql.com. You can download a copy and install it on your local computer. Here is how you can do this: Go to http://dev.mysql.com/downloads /mysql...
2007-04-18, 4674👍, 0💬

How To Remove a File
How To Remove a File? - PHP Script Tips - Working with Directoris and Files If you want to remove an existing file, you can use the unlink() function. Here is a PHP script example on how to use unlink(): &lt;?php if (file_exists("/temp/todo.txt") ){ unlink("/temp/todo.txt"); print("File removed....
2007-04-23, 4672👍, 0💬

How To Retrieve the Session ID of the Current Session
How To Retrieve the Session ID of the Current Session? - PHP Script Tips - Understanding and Using Sessions Normally, you don't need to know the session ID of the current session. But if you are interested to know the session ID created by the PHP engine, there are two ways to get it: Calling sessio...
2007-04-18, 4670👍, 0💬

How To Return a Value Back to the Function Caller
How To Return a Value Back to the Function Caller? - PHP Script Tips - Creating Your Own Functions You can return a value to the function caller by using the "return $value" statement. Execution control will be transferred to the caller immediately after the return statement. If there are other stat...
2007-04-24, 4664👍, 0💬

<< < 3 4 5 6 7 8 9 10 11 > >>   Sort: Date