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

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, 4657👍, 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, 4640👍, 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, 4636👍, 0💬

How To Insert Data into an Existing Table
How To Insert Data into an Existing Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you want to insert a row of data into an existing table, you can use the INSERT INTO statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql ...
2007-05-10, 4634👍, 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, 4631👍, 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, 4630👍, 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, 4630👍, 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, 4627👍, 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, 4625👍, 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, 4624👍, 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, 4622👍, 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, 4620👍, 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, 4620👍, 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, 4618👍, 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, 4612👍, 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, 4612👍, 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, 4608👍, 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, 4606👍, 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, 4605👍, 0💬

What Is a Session
What Is a Session? - PHP Script Tips - Understanding and Using Sessions A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. There is only one session object available to your PHP scripts at any time. Data saved to the session by a sc...
2007-04-19, 4605👍, 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, 4601👍, 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, 4600👍, 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, 4598👍, 0💬

How To Query Tables and Loop through the Returning Rows
How To Query Tables and Loop through the Returning Rows? - PHP Script Tips - Working with MySQL Database The best way to query tables and loop through the returning rows is to run the SELECT statement with the catch the mysql_query() function, catch the returning object as a result set, and loop thr...
2007-04-19, 4598👍, 0💬

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