<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   Sort: Date

Domain and Path Attributes for Cookies in PHP
What Are Domain and Path Attributes for Cookies in PHP? Cookies can also be defined with two other attributes: Domain - A cookie attribute that defines the domain name of Web servers where this cookie is valid. Web browsers holding this cookie should not sent it back to any Web server outside the sp...
2016-11-03, 341👍, 0💬

Including Variables in Double-Quoted Strings in PHP
How To Include Variables in Double-Quoted Strings? Variables included in double-quoted strings will be interpolated. Their values will be concatenated into the enclosing strings. For example, two statements in the following PHP script will print out the same string: &lt;?php $variable = "and"; e...
2016-10-13, 341👍, 0💬

Use Developer Portal Internally
How to use the Developer Portal internally by you as the publisher? Normally, the Developer Portal of an Azure API Management Service is used by client developers. But as a publisher, you can also use the Developer Portal to test API operations internally. You can follow this tutorial to access the ...
2017-09-20, 340👍, 0💬

Input Values of SELECT Tags in PHP
What Are Input Values of SELECT Tags in PHP? SELECT tags are used in forms to provide dropdown lists. Entries in a dropdown list are defined by OPTION tags, which can provide input values in two ways: Implicit value - Provided as &lt;OPTION&gt;input_va lue&lt;/OPTION&gt;,where input_...
2016-11-13, 340👍, 0💬

Specifying Domain and Path for a Cookie in PHP
How To Specify Domain and Path for a Cookie in PHP? 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 temporary and persistent cookies: &lt;?php se...
2016-11-03, 340👍, 0💬

Server-Side Image Maps in HTML
What Is a Server-Side Image Map? A server-side image map is an image inside a hyper link. The image must be defined with the "ismap" attribute in the "img" element. When a server-side image map is clicked in a browser window, the mouse coordinates will be delivered to the server by them to the end o...
2017-03-22, 339👍, 0💬

Listing All Values of Submitted Fields in PHP
How To List All Values of Submitted Fields in PHP? If you want list all values of submitted fields, you can write a simple loop to retrieve all entries in the $_REQUEST array. Below is an improved version of processing_forms.php to list all submitted input values: &lt;?php print("&lt;html&am...
2016-11-15, 339👍, 0💬

Applying UUEncode to a String in PHP
How To Apply UUEncode to a String? UUEncode (Unix-to-Unix Encoding) is a simple algorithm to convert a string of any characters into a string of printable characters. UUEncode is reversible. The reverse algorithm is called UUDecode. PHP offeres two functions for you to UUEncode or UUDecode a string:...
2016-10-13, 339👍, 0💬

Number of Rows Affected by a SQL Statement in PHP
How To Get the Number of Rows Selected or Affected by a SQL Statement in PHP? There are two functions you can use the get the number of rows selected or affected by a SQL statement: mysql_num_rows($rs) - Returns the number of rows selected in a result set object returned from SELECT statement. mysql...
2016-10-20, 338👍, 0💬

Including Array Elements in Double-Quoted Strings in PHP
How Many Ways to Include Array Elements in Double-Quoted Strings? There are 2 formats to include array elements in double-quoted strings: "part 1 $array[key] part 2" - This is called simple format. In this format, you can not specify the element key in quotes. "part 1 {$array['key']} part 2" - This ...
2016-10-13, 338👍, 0💬

Setting ID Column as Auto-Incremented in PHP
How To Set the ID Column as Auto-Incremented in PHP? 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 MySQL server to automatically assign a...
2016-10-17, 337👍, 0💬

JSON-stringify-Object.html - JSON.stringify() on Objects
How JSON.stringify() behaves on JavaScript objects? When processing an object, JSON.stringify() behave depending on the type of objects based on the following rules: Boolean, Number, and String objects are converted to the corresponding primitive JSON values during stringification. Date objects are ...
2017-09-08, 336👍, 0💬

HTML Line Break 'br' Tag/Element
What Is an HTML "br" Tag/Element? A "br" element is an inline element that you can use to specify a line break in the paragraph. Here are basic rules about "br" elements: "br" elements are inline elements. "br" elements can not be used at block level. "br" elements are empty content elements. Most b...
2017-07-21, 336👍, 0💬

Using HTML 'image' Input Fields
How To Use "image" Input Fields? An "image" input field is defined as &lt;input type="image" .../&gt;. "image" input fields can be used to create image buttons. If an image button is clicked, the mouse coordinates on the image and other form input data will be submitted to the form processin...
2017-04-04, 336👍, 0💬

Splitting a File Path Name into Parts in PHP
How To Break a File Path Name into Parts in PHP? 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 returns them in an array. Here is a PHP script...
2016-11-17, 336👍, 0💬

Single Cookie Size Limit in PHP
How Large Can a Single Cookie Be in PHP? How large can a single cookie be? The answer is depending what is the Web browser your visitor is using. Each browser has its own limit: Internet Explorere (IE): about 3904 bytes Mozilla Firefox: about 3136 bytess If you want to test this limit, copy this sam...
2016-10-30, 336👍, 0💬

Timeout Period on Session Values in PHP
What Is the Timeout Period on Session Values in PHP? The PHP engine has no direct settings on session timeout period. But it has a session garbage collection mechanism that you can set to remove those special files containing session values. There are 3 settings you can use to define the session gar...
2016-10-25, 336👍, 0💬

FORM Tag for Uploading Files in PHP
How To Write the FORM Tag Correctly for Uploading Files in PHP? When users clicks the submit button, files specified in the &lt;INPUT TYPE=FILE...&gt; will be transferred from the browser to the Web server. This transferring (uploading) process is controlled by a properly written &lt;FOR...
2016-10-17, 336👍, 0💬

Detecting File Uploading Errors in PHP
How To Detect File Uploading Errors in PHP? If there was a problem for a file upload request specified by the &lt;INPUT TYPE=FILE NAME=fieldName...&gt; tag, an error code will be available in $_FILES[$fieldName]['error']. Possible error code values are: UPLOAD_ERR_OK (0) - There is no error,...
2016-10-14, 336👍, 0💬

HTML 'big' and 'small' Tags/Elements
What Are HTML "big" and "small" Tags/Elements? "big" and "small" elements are inline elements that you can use to specify text to be displayed in bigger and smaller font sizes respectively. Here are basic rules about "big" and "small" elements: "big" and "small" elements are inline elements. "big" a...
2017-07-21, 335👍, 0💬

Updating Existing Rows in PHP
How To Update Existing Rows in a Table in PHP? Updating existing rows in a table requires to run the UPDATE statement with a WHERE clause to identify the row. The following sample script updates one row with two new values: &lt;?php include "mysql_connection.php"; $sql = "UPDATE fyi_links SET no...
2016-10-19, 335👍, 0💬

Concatenating Two Strings in PHP
How To Concatenate Two Strings Together? You can use the string concatenation operator (.) to join two strings into one. Here is a PHP script example of string concatenation: &lt;?php echo 'Hello ' . "world!\n"; ?&gt; This script will print: Hello world!   ⇒Understanding PHP String Literals ...
2016-10-13, 335👍, 0💬

Taking a Substring in PHP
How To Take a Substring from a Given String? 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"; print("Position counted from left: ".substr($string,0,5)."...
2016-10-13, 335👍, 0💬

Mistake on Setting Cookie Path and Domain in PHP
What Is the Common Mistake When Setting Path and Domain on Temporary Cookies in PHP? 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 script below shows an example of this mistake: &...
2016-11-03, 334👍, 0💬

<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   Sort: Date