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

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, 4771👍, 0💬

How To Turn On the Session Support
How To Turn On the Session Support? - PHP Script Tips - Understanding and Using Sessions The session support can be turned on automatically at the site level, or manually in each PHP page script: Turning on session support automatically at the site level: Set session.auto_start = 1 in php.ini. Turni...
2007-04-18, 4770👍, 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, 4768👍, 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, 4761👍, 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, 4759👍, 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, 4759👍, 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, 4756👍, 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, 4756👍, 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, 4753👍, 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, 4752👍, 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, 4750👍, 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, 4749👍, 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, 4739👍, 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, 4738👍, 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, 4734👍, 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, 4734👍, 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, 4732👍, 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, 4732👍, 0💬

How To Delete an Existing Rows in a Table
How To Delete an Existing Rows in a Table? - PHP Script Tips - Working with MySQL Database If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row: &lt;?php include "mysql_connection.php"; $sq...
2007-04-14, 4731👍, 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, 4730👍, 0💬

How To Support Multiple-Page Forms
How To Support Multiple-Page Forms? - PHP Script Tips - Processing Web Forms If you have a long form with a lots of fields, you may want to divide the fields into multiple groups and present multiple pages with one group of fields on one page. This makes the a long form more user-friendly. However, ...
2007-04-22, 4728👍, 0💬

What Are the Special Characters You Need to Escape in Double-Quoted Stings
What Are the Special Characters You Need to Escape in Double-Quoted Stings? - PHP Script Tips - Understanding String Literals and Operations There are two special characters you need to escape in a double-quote string: the double quote (") and the back slash (\). Here is a PHP script example of doub...
2007-04-20, 4728👍, 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, 4727👍, 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, 4726👍, 0💬

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