<< < 6 7 8 9 10 11   Sort: Rank

How To Get the ID Column Auto-Incremented
How To Get the ID Column Auto-Incremented? - PHP Script Tips - Working with MySQL Database Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow ...
2007-04-14, 5205👍, 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, 4888👍, 0💬

Variables in Double Quoted Strings
Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example? In this example, "$a dollars" or "{$a} dollars" will print the same result. But in other cases, you need to use curly braces to protect variable names. For example, for following PHP script will prin...
2007-02-27, 6604👍, 0💬

Octal and Decimal Numbers
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem? If you assign a variable with a value of 0123, PHP will interpret as an octal number resulting to decimal value of 83. All numbers that preceded with a 0 (zero) will be interpreted...
2007-02-27, 8915👍, 0💬

Executing a PHP Script Using Command Line
How can I execute a PHP script using command line? Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program. Be aware that if your PHP script was w...
2007-02-27, 6511👍, 0💬

mysql_fetch_object() and mysql_fetch_array() Functions
What is the difference between mysql_fetch_object() and mysql_fetch_array() functions in PHP? mysql_fetch_object() fetches the current row of data from the query result associated with the specified result identifier. The row is returned as an object. See the example code: &lt;?php $result = mys...
2007-02-27, 7096👍, 0💬

urlencode() and urldecode() Functions?
What are urlencode() and urldecode() functions in PHP? string urlencode(str) - Returns the URL encoded version of the input string. String values to be used in URL query string need to be URL encoded. In the URL encoded version: Alphanumeric characters are maintained as is. Space characters are conv...
2007-02-27, 6685👍, 0💬

require(), include() and include_once() Functions
What are the differences between require(), include() and include_once() functions in PHP? All three functions are used to include and evaluate a file into the current script execution. The include_once() statement includes and evaluates the specified file during the execution of the script. This is...
2007-02-27, 5695👍, 0💬

Uploading Files with File Input Fields in a Form
How To Write the FORM Tag Correctly for Uploading Files? When users clicks the submit button, files specified in the &lt;INPUT TYPE=FILE...> will be transferred from the browser to the Web server. This transferring (uploading) process is controlled by a properly written &lt;FORM...> tag as: ...
2007-02-27, 5555👍, 0💬

Uploading Files with File Input Fields in a Form
How To Write the FORM Tag Correctly for Uploading Files? When users clicks the submit button, files specified in the &lt;INPUT TYPE=FILE...> will be transferred from the browser to the Web server. This transferring (uploading) process is controlled by a properly written &lt;FORM...> tag as: ...
2007-02-27, 5391👍, 0💬

define() - Defining Constants
How do you define a constant in PHP? You can define a constant by using the define() function. Once a constant is defined, it can never be changed or undefined. For example: &lt;?php define("CONSTANT", "Hello world."); echo CONSTANT; // outputs "Hello world." echo Constant; // outputs "Constant"...
2007-02-27, 5687👍, 0💬

Persistent Cookies
What Is a Persistent Cookie? A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased. You shoul...
2007-02-27, 5938👍, 0💬

Differences between Simple Variables and Variable Variables
What is the difference between $message and $$message in PHP? $message is a simple variable with a fixed name which is called "message". $$message is a variable variable with a variable name which is stored in another variable called $message. If $message contains "user", $$message is the same as $u...
2007-02-27, 5527👍, 0💬

Number of Days between Two Dates
How can we know the number of days between two given dates in PHP? Simple arithmetic: &lt;?php $date1 = date('Y-m-d'); $date2 = '2006-07-01'; $days = (strtotime($date1) - strtotime($date2)) / (60 * 60 * 24); $days = (int) $days; echo "Number of days since '2006-07-01': $days"; ?&gt;
2007-02-27, 6556👍, 0💬

What Is PEAR
What Is PEAR? PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a n...
2007-02-27, 5580👍, 0💬

What Is a Session
What Is a Session? 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 script can be retrieved by the same script or another s...
2007-02-27, 5773👍, 0💬

What is PHP
What is PHP? The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.
2007-02-27, 5825👍, 0💬

Tag &lt;?= ... ?&gt; in PHP
What does a special set of tags &lt;?= and ?&gt; do in a PHP script page? &lt;?= expression ?&gt; allows you to output the value of the specified expression into the HTML document directly.
2006-09-01, 8463👍, 0💬

Expression Evaluation
What is the value of this expression? +1-2*3/4 -0.5
2006-09-01, 7762👍, 0💬

<< < 6 7 8 9 10 11   Sort: Rank