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

Performing Key Word Search in PHP
How To Perform Key Word Search in Tables in PHP? The simplest way to perform key word search is to use the SELECT statement with a LIKE operator in the WHERE clause. The LIKE operator allows you to match a text field with a keyword pattern specified as '%keyword%', where (%) represents any number of...
2016-10-17, 282👍, 0💬

Processing Uploaded Files in PHP
How To Process Uploaded Files in PHP? How to process the uploaded files? The answer is really depending on your application. For example: You can attached the outgoing emails, if the uploaded files are email attachments. You can move them to user's Web page directory, if the uploaded files are user'...
2016-10-17, 282👍, 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, 282👍, 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, 282👍, 0💬

Joining Multiple Strings in PHP
How To Join Multiple Strings into a Single String? 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(): &lt;?php $date = array('01', '01', '2006'); $keys =...
2016-10-13, 282👍, 0💬

Reducing the Display Size of an Image in HTML
How To Reduce the Display Size of an Image? If an image embedded inline is too big when displayed in a browser, you can use "width" and "height" attributes to reduce the image's display size. The display width and height should be proportional to the actual width and height of the image. Otherwise, ...
2017-03-27, 281👍, 0💬

Other HTML Block Elements
What Are Other HTML Block Elements? Other block elements that are not covered in this collection: ul, ol, dl - Specifying lists of items. table - Specifying tables of columns and rows. form - Specifying forms with input fields. script - Specifying client-side script codes. div - Specifying structura...
2017-08-03, 280👍, 0💬

HTML 'hr' Tags/Elements
What Are "hr" Tags/Elements? A "hr" element is a block level element that can be used directly as a sub-element in the body element. You can use "hr" elements to specify horizontal rulers. Here are basic rules about "hr" elements: "hr" elements can only have empty contents. "hr" elements are block e...
2017-08-03, 280👍, 0💬

Creating an Array in PHP
How To Create an Array in PHP? 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("Empty array:\n"); $emptyArray = array(); print_r($emptyArray); ...
2016-10-15, 280👍, 0💬

Removing Leading and Trailing Spaces in PHP
How To Remove Leading and Trailing Spaces from User Input Values? If you are taking input values from users with a Web form, users may enter extra spaces at the beginning and/or the end of the input values. You should always use the trim() function to remove those extra spaces as shown in this PHP s...
2016-10-13, 280👍, 0💬

"Hello.c" - Compile and Run C Program
How to use Visual Studio command tools to compile and run a C program? If you want to compile and run a standard C program with Visual Studio command tools, you can follow this tutorial: 1. Create a simple C program, Hello.c, with a text editor: #include &lt;stdio.h&gt; void main() { printf(...
2017-08-21, 279👍, 0💬

Other HTML Inline Elements
What Are Other HTML Inline Elements? Other inline elements that are not covered in this collection: a - Defining an anchor. img - Defining an image. map - Defining a clickable image map. input - Defining an input field in a form. select - Defining a selection field in a form. textarea - Defining an ...
2017-07-21, 279👍, 0💬

Firefox Storing Persistent Cookies in PHP
Where Does File Firefox Store Persistent Cookies in PHP? If you change Firefox to keep cookies "until they expire", Firefox will store persistent cookies from all Web servers in a single file at: \Documents and Settings\$user\Application Data\Mozilla \Firefox\Profiles\xby7vgys.def ault\cookie.txt.Op...
2016-10-30, 279👍, 0💬

Retrieving the Last Auto Increment ID in PHP
How To Get the Last ID Assigned by MySQL in PHP? If you use an ID column with AUTO_INCREMENT attribute, you can use the mysql_insert_id() function to get the last ID value assigned by the MySQL server, as shown in the sample script below: &lt;?php include "mysql_connection.php"; $sql = "INSERT I...
2016-10-17, 279👍, 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, 279👍, 0💬

Number of Cookies Supported in PHP
How Many Cookies Can You Set in PHP? How many cookies can you set in your PHP page? The answer is depending what is the Web browser your visitor is using. Each browser has its own limit: Internet Explorere (IE): 20 Mozilla Firefox: 50 If you want to test this limit, copy this sample script, how_many...
2016-10-30, 278👍, 0💬

Comparing Two Strings in PHP
How To Compare Two Strings with Comparison Operators? PHP supports 3 string comparison operators, &lt;, ==, and &gt;, that generates Boolean values. Those operators use ASCII values of characters from both strings to determine the comparison results. Here is a PHP script on how to use compar...
2016-10-13, 278👍, 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, 277👍, 0💬

Animated Images in HTML
What Is an Animated Image? An animated image is a special image file saved in animated GIF format. When an animated image is displayed in a browser window, multiple image frames will be displayed in sequence to form a simple animation. Here is a tutorial example with a server-side image map: &lt...
2017-03-22, 277👍, 0💬

What Is File Upload in PHP
What Is File Upload in PHP? File upload is Web page function which allows visitor to specify a file on the browser's system and submit it to the Web server. This is a very useful function for many interactive Web sites. Some examples are: Web base email systems for users to send attachments. Forums ...
2016-10-17, 277👍, 0💬

Testing If a Variable Is an Array in PHP
How To Test If a Variable Is an Array in PHP? 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)."\n"); $var = array(); print("Test 2: ". is_array($var)."\n"); ...
2016-10-15, 277👍, 0💬

Testing the strpos() Return Value in PHP
What Is the Best Way to Test the strpos() Return Value? Because strpos() could two types of values, Integer and Boolean, you need to be careful about testing the return value. The best way is to use the "Identical(===)" operator. Do not use the "Equal(==)" operator, because it does not differentiate...
2016-10-13, 277👍, 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, 276👍, 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, 276👍, 0💬

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