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

Supporting Multiple Submit Buttons in PHP
How To Support Multiple Submit Buttons in PHP? Sometimes, you may need to give visitors multiple submit buttons on a single form to allow them to submit the form for different purposes. For example, when you show your customer a purchase order in a Web form, you may give your customer 3 submit butto...
2016-11-08, 318👍, 0💬

Joining Array Values into a Single String in PHP
How To Join Multiple Strings Stored in an Array into a Single String in PHP? 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('0...
2017-01-05, 317👍, 0💬

Creating a Table in PHP
How To Create a Table in PHP? If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "CREATE TABLE fyi_links (" . " id INTEGER NOT NULL" . ", url VARCHAR(80) NOT NULL" . ", notes VARCHAR(1024)...
2016-10-20, 317👍, 0💬

Defining an HTML Hyper Link
How To Define a Hyper Link? If you want to define a hyper link in your HTML document, you need to use an "a" element with the "href" attribute. Here are basic rules about defining a hyper link with "a" element: An "a" element with the "href" attribute defines a hyper link. The "href" attribute is us...
2017-07-15, 315👍, 0💬

Retrieving the Original Query String in PHP
How To Retrieve the Original Query String in PHP? If you have coded some values in the URL without using the standard form GET format, you need to retrieve those values in the original query string in $_SERVER['QUERY_STRING']. The script below is an enhanced version of processing_forms.php which pri...
2016-11-05, 314👍, 0💬

Attributes of an HTML 'img' Element
What Are the Attributes of an "img" Element? There are 4 commonly used attributes for an "img" element: "src" - Required attribute. Used to specify the URL of the image file. "alt" - Required attribute. Used to specify the name of the image. "width" - Optional attribute. Used to specify the width of...
2017-03-27, 313👍, 0💬

Reading the Entire File to a String in PHP
How To Read the Entire File into a Single String in PHP? 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 in a single string. Here is a PHP scri...
2016-12-04, 313👍, 0💬

Using isset($_REQUEST('name')) in PHP
How To Avoid the Undefined Index Error in PHP? If you don't want your PHP page to give out errors as shown in the previous exercise, you should consider checking all expected input fields in $_REQUEST with the isset() function as shown in the example script below: &lt;?php if (isset($_REQUEST['n...
2016-11-15, 312👍, 0💬

Specifying Input Values for Checkboxes in PHP
How To Specify Input Values for Checkboxes in PHP? Checkboxes can be used in a form for two situations: As a single switch - One &lt;INPUT TYPE=CHECKBOX ...&gt; tag, with no input value specified. When submitted with button pushed down, you will receive a value of "on". When submitted with b...
2016-11-13, 312👍, 0💬

Supporting Hidden Form Fields in PHP
How To Support Hidden Form Fields in PHP? Hidden fields are special fields in a form that are not shown on the Web page. But when the form is submitted, values specified in the hidden fields are also submitted to the Web server. A hidden field can be specified with the &lt;INPUT TYPE=HIDDEN ...&...
2016-11-08, 312👍, 0💬

Uploading Files to Web Servers in PHP
Where to find tutorials on how to upload files to Web servers in PHP? A collection of tutorials to answer many frequently asked questions on how to upload files to Web servers in PHP. Clear explanations and tutorial exercises are provided on creating file upload HTML tags, setting encoding type on H...
2016-10-17, 312👍, 0💬

Downloading and Installing PHP
Where to find tutorials in downloading and installing PHP binary version for Windows system. Here is a list of tutorials to answer many frequently asked questions compiled by FYIcenter.com team in downloading and installing PHP binary version for Windows system. Installing PHP for Windows Verifying ...
2016-10-13, 311👍, 0💬

Passing Variables by References in PHP
How To Pass Variables By References? in PHP? You can pass a variable by reference to a function by taking the reference of the original variable, and passing that reference as the calling argument. Here is a PHP script on how to use pass variables by references: &lt;?php function swap($a, $b) { ...
2016-12-24, 310👍, 0💬

Function with Undefined Number of Arguments in PHP
How To Define a Function with Any Number of Arguments? in PHP? If you want to define a function with any number of arguments, you need to: Declare the function with no argument. Call func_num_args() in the function to get the number of the arguments. Call func_get_args() in the function to get all t...
2016-12-04, 310👍, 0💬

Returning a Value from a Function in PHP
How To Return a Value Back to the Function Caller? in PHP? 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 statements in the function after the return ...
2016-12-24, 308👍, 0💬

Reading a Text File to an Array in PHP
How To Read a Text File into an Array in PHP? 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, and returns the array to you. Here is a...
2016-12-04, 308👍, 0💬

Protecting Special Characters in Query String in PHP
How To Protect Special Characters in Query String in PHP? If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode(): &lt;?php print("&lt;html&gt;"); p...
2016-11-05, 308👍, 0💬

Removing a Cookie in PHP
How To Remove a Cookie in PHP? 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 negative expiration time, which will cause the browse...
2016-11-03, 308👍, 0💬

Saving Values in the Session in PHP
How To Save Values to the Current Session in PHP? When session is turned on, a session will be automatically created for you by the PHP engine. If you want to save any values to the session, you can use the pre-defined associative array called $_SESSION. The following PHP script shows you how to sav...
2016-10-26, 308👍, 0💬

HTML Ordered List 'ol' Tag/Element
What Is an "ol" Tag/Element? An "ol" element is block level element that can be used to define an ordered list, where items are displayed with leading sequential numbers. Here are basic rules about "ol" elements: "ol" elements are block level elements. "ol" elements can not have text contents. An "o...
2017-06-16, 307👍, 0💬

Creating an HTML Link to Open a Document in New Window
How To Create an HTML Link to Open a Document in a New Window? Normally, if a hyper link is linked to an HTML document, the browser will display the linked document in the same window as the current document. But if you want to the browser to display the linked document in a new window, you can add ...
2017-06-16, 307👍, 0💬

Creating a Web Form in PHP
How To Create a Web Form in PHP? If you take input data from visitors on your Web site, you can create a Web form with input fields to allow visitors to fill in data and submit the data to your server for processing. A Web form can be created with the &lt;FORM&gt; tag with some input tags. T...
2016-11-17, 307👍, 0💬

Hyper Links in HTML Documents
What Are Hyper Links? A hyper link is a special text in an HTML document defined with a hidden link to another resource on the Internet. While viewing the HTML document, you can click the hyper link, the browser will follow the hidden link to fetch the linked resource to you. Hyper links in HTML doc...
2017-07-15, 306👍, 0💬

Using MySQL Command Line Interface in PHP
How To Use MySQL Command Line Interface in PHP? MySQL server comes with a command line interface, which will allow you to operate with the server with SQL statements and other commands. To start the command line interface, you can run the \mysql\bin\mysql program. The tutorial exercise below shows y...
2016-10-22, 306👍, 0💬

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