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

How To Turn on mysql Extension on the PHP Engine
How To Turn on mysql Extension on the PHP Engine? - MySQL FAQs - PHP Connections and Query Execution The "mysql" API extension is provided as "php_mysql.dll" for Windows system. Your PHP binary download package should have "php_mysql.dll" included. No need for another download. But you need to check...
2007-05-10, 4889👍, 0💬

What Is a Result Set Object
What Is a Result Set Object? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts A result set object is a logical representation of data rows returned by mysql_query() function on SELECT statements. Every result set object has an internal pointer used to identify the current row in t...
2007-05-10, 4879👍, 0💬

How To Query Multiple Tables Jointly
How To Query Multiple Tables Jointly? - PHP Script Tips - Working with MySQL Database If you want to query information stored in multiple tables, you can use the SELECT statement with a WHERE condition to make an inner join. Assuming that you have 3 tables in a forum system: "users" for user profile...
2007-04-19, 4879👍, 0💬

How To Remove a Cookie
How To Remove a Cookie? - PHP Script Tips - Understanding and Managing Cookies Once a cookie is sent from the server to the browser, there is no direct way for the server to ask the browser to remove the cookie. But you can use the setcookie() function to send the same cookie to browser with a negat...
2007-04-24, 4876👍, 0💬

How To Get the Total Number of Values in an Array
How To Get the Total Number of Values in an Array? - PHP Script Tips - PHP Built-in Functions for Arrays You can get the total number of values in an array by using the count() function. Here is a PHP example script: &lt;?php $array = array("PHP", "Perl", "Java"); print_r("Size 1: ".count($array...
2007-04-20, 4876👍, 0💬

Where Are the Session Values Stored
Where Are the Session Values Stored? - PHP Script Tips - Understanding and Using Sessions When a value is saved into the current session by one PHP page, the PHP engine must stored this value somewhere on Web server, so that the PHP engine can retrieve it back when same visitor comes back to request...
2007-04-18, 4869👍, 0💬

Which HTML Tag Allows Users to Specify a File for Uploading
Which HTML Tag Allows Users to Specify a File for Uploading? - PHP Script Tips - Uploading Files to Web Servers To present an input field on your Web page to allow users to specify a local file to upload, you need to use the &lt;INPUT TYPE="FILE" ...> tag inside a &lt;FORM ...> tag. The &...
2007-04-19, 4868👍, 0💬

How To Convert Strings to Numbers
How To Convert Strings to Numbers? - PHP Script Tips - Understanding String Literals and Operations In a numeric context, PHP will automatically convert any string to a numeric value. Strings will be converted into two types of numeric values, double floating number and integer, based on the followi...
2007-04-20, 4867👍, 0💬

How Arrays Are Passed Through Arguments
How Arrays Are Passed Through Arguments? - PHP Script Tips - Creating Your Own Functions Like a normal variable, an array is passed through an argument by value, not by reference. That means when an array is passed as an argument, a copy of the array will be passed into the function. Modifying that ...
2007-04-24, 4864👍, 0💬

What Is a Cookie
What Is a Cookie? - PHP Script Tips - Understanding and Managing Cookies A cookie is a small amount of information sent by a Web server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used for authenticating, tracking, and maintaining ...
2007-04-25, 4861👍, 0💬

How To Test If a Variable Is an Array
How To Test If a Variable Is an Array? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations Testing if a variable is an array is easy. Just use the is_array() function. Here is a PHP script on how to use is_array(): &lt;?php $var = array(0,0,7); print("Test 1: ". is_array($var...
2007-04-20, 4861👍, 0💬

How To Test Persistent Cookies
How To Test Persistent Cookies? - PHP Script Tips - Understanding and Managing Cookies If you want to test persistent cookies, you can copy the following PHP script, setting_persistent_cookies.php ,to your Web server: &lt;?php setcookie("LoginName","FYICent er");setcookie("PreferredColor","Bl ue"...
2007-04-25, 4859👍, 0💬

How To Convert Numbers to Strings
How To Convert Numbers to Strings? - PHP Script Tips - Understanding String Literals and Operations In a string context, PHP will automatically convert any numeric value to a string. Here is a PHP script examples: &lt;?php print(-1.3e3); print("\n"); print(strlen(-1.3e3)); print("\n"); print("Pr...
2007-04-20, 4856👍, 0💬

What Is the Common Mistake When Setting Path and Domain on Temporary Cookies
What Is the Common Mistake When Setting Path and Domain on Temporary Cookies? - PHP Script Tips - Understanding and Managing Cookies A common mistake made by many PHP developers is using an empty string for the expiration time parameter when setting path and domain for temporary cookies. The PHP scr...
2007-04-24, 4854👍, 0💬

How To Remove Values Saved in the Current Session
How To Remove Values Saved in the Current Session? - PHP Script Tips - Understanding and Using Sessions If you want to remove values saved in the current session, you should use the unset() function on those saved values in $_SESSION, or use array() to empty $_SESSION: unset($_SESSION['MyColor']) - ...
2007-04-17, 4852👍, 0💬

How To Break a File Path Name into Parts
How To Break a File Path Name into Parts? - PHP Script Tips - Working with Directoris and Files If you have a file name, and want to get different parts of the file name, you can use the pathinfo() function. It breaks the file name into 3 parts: directory name, file base name and file extension; and...
2007-04-23, 4851👍, 0💬

How To Append New Data to the End of a File
How To Append New Data to the End of a File? - PHP Script Tips - Reading and Writing Files If you have an existing file, and want to write more data to the end of the file, you can use the fopen($fileName, "a") function. It opens the specified file, moves the file pointer to the end of the file, and...
2007-04-22, 4848👍, 0💬

How To Read a Text File into an Array
How To Read a Text File into an Array? - PHP Script Tips - Reading and Writing Files If you have a text file with multiple lines, and you want to read those lines into an array, you can use the file() function. It opens the specified file, reads all the lines, puts each line as a value in an array, ...
2007-04-22, 4848👍, 0💬

How To Take a Substring from a Given String
How To Take a Substring from a Given String? - PHP Script Tips - PHP Built-in Functions for Strings If you know the position of a substring in a given string, you can take the substring out by the substr() function. Here is a PHP script on how to use substr(): &lt;?php $string = "beginning"; pri...
2007-04-21, 4844👍, 0💬

How Cookies Are Transported from Browsers to Servers
How Cookies Are Transported from Browsers to Servers? - PHP Script Tips - Understanding and Managing Cookies Cookies are transported from a Web browser to a Web server in the header area of the HTTP request message. Each cookie will be included in a separate "Cookie:" header line in the following fo...
2007-04-24, 4841👍, 0💬

How To Open Standard Output as a File Handle
How To Open Standard Output as a File Handle? - PHP Script Tips - Reading and Writing Files If you want to open the standard output as a file handle yourself, you can use the fopen("php://stdout") function. It creates a special file handle linking to the standard output, and returns the file handle....
2007-04-23, 4839👍, 0💬

How To Specify Argument Default Values
How To Specify Argument Default Values? - PHP Script Tips - Creating Your Own Functions If you want to allow the caller to skip an argument when calling a function, you can define the argument with a default value when defining the function. Adding a default value to an argument can be done like thi...
2007-04-25, 4837👍, 0💬

How To Specify Domain and Path for a Cookie
How To Specify Domain and Path for a Cookie? - PHP Script Tips - Understanding and Managing Cookies If you want to specify domain and path for cookie, you can use the setcookie() function with two extra parameters. The sample PHP script below shows you how to set the domain and path attributes for t...
2007-04-24, 4836👍, 0💬

Where Are PHP Configuration Settings Stored
Where Are PHP Configuration Settings Stored? - PHP Script Tips - Downloading and Installing PHP PHP stores configuration settings in a file called php.ini in PHP home directory. You can open it with any text editor to your settings.
2007-04-22, 4836👍, 0💬

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