<< < 5 6 7 8 9 10 11 >   Sort: Date

How To Run a SQL Statement
How To Run a SQL Statement? - MySQL FAQs - PHP Connections and Query Execution You can run any types of SQL statements through the mysql_query() function. It takes the SQL statement as a string and returns different types of data depending on the SQL statement type and execution status: Returning FA...
2007-05-10, 4669👍, 0💬

How Variables Are Passed Through Arguments
How Variables Are Passed Through Arguments? - PHP Script Tips - Creating Your Own Functions Like more of other programming languages, variables are passed through arguments by values, not by references. That means when a variable is passed as an argument, a copy of the value will be passed into the ...
2007-04-24, 4666👍, 0💬

How To Connect to MySQL from a PHP Script
How To Connect to MySQL from a PHP Script? - PHP Script Tips - Working with MySQL Database If you want access the MySQL server, you must create a connection object first by calling the mysql_connect() function in the following format: $con = mysql_connect($server, $username, $password); If you are c...
2007-04-18, 4664👍, 0💬

How To Delete Cookie Files on Your Computer
How To Delete Cookie Files on Your Computer? - PHP Script Tips - Understanding and Managing Cookies A simple way to delete cookie files on your computer is to use the function offered by the IE browser. The following tutorial exercise shows you how to delete cookie files created by IE: Open IE (Inte...
2007-04-24, 4661👍, 0💬

Can You Specify the "new line" Character in Single-Quoted Strings
Can You Specify the "new line" Character in Single-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations You can not specify the "new line" character in a single-quoted string. If you don't believe, try this script: &lt;?php echo '\n will not work in single quoted stri...
2007-04-20, 4660👍, 0💬

How To Create a Table
How To Create a Table? - PHP Script Tips - Working with MySQL Database 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 VARCH...
2007-04-19, 4660👍, 0💬

Is It More Secure to Use Cookies to Transfer Session IDs
Is It More Secure to Use Cookies to Transfer Session IDs? - PHP Script Tips - Understanding and Using Sessions Is it more secure to use cookies to transfer session IDs? The answer is yes, because attacking your Web site using URL parameters is much easier than using cookies. So if you are the system...
2007-04-17, 4657👍, 0💬

How To Check Your PHP Installation
How To Check Your PHP Installation? - MySQL FAQs - PHP Connections and Query Execution PHP provides two execution interfaces: Command Line Interface (CLI) and Common Gateway Interface (CGI). If PHP is installed in the \php directory on your system, you can try this to check your installation: Run "\...
2007-05-10, 4655👍, 0💬

How Many Escape Sequences Are Recognized in Double-Quoted Strings
How Many Escape Sequences Are Recognized in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 12 escape sequences you can use in double-quoted strings: \\ - Represents the back slash character. \" - Represents the double quote character. \$ - Represent...
2007-04-20, 4654👍, 0💬

How Many Escape Sequences Are Recognized in Single-Quoted Strings
How Many Escape Sequences Are Recognized in Single-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 2 escape sequences you can use in single-quoted strings: \\ - Represents the back slash character. \' - Represents the single quote character.
2007-04-20, 4653👍, 0💬

How To Get MySQL Statement Execution Errors
How To Get MySQL Statement Execution Errors? - MySQL FAQs - PHP Connections and Query Execution When you execute a MySQL statement with mysql_query(), and the statement failed, mysql_query() will return the Boolean value FALSE. This is good enough to tell that there is something wrong with that stat...
2007-05-10, 4646👍, 0💬

How To Update an Existing Rows in a Table
How To Update an Existing Rows in a Table? - PHP Script Tips - Working with MySQL Database 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_conn...
2007-04-19, 4646👍, 0💬

How To Create a New Database
How To Create a New Database? - MySQL FAQs - PHP Connections and Query Execution A database in a MySQL server is a logical container used to group tables and other data objects together as a unit. If you are a the administrator of the server, you can create a new databases using the CREATE DATABASE ...
2007-05-10, 4642👍, 0💬

How To Create a Directory
How To Create a Directory? - PHP Script Tips - Working with Directoris and Files You can use the mkdir() function to create a directory. Here is a PHP script example on how to use mkdir(): &lt;?php if (file_exists("/temp/download") ){ print("Directory already exists.\n"); } else { mkdir("/temp/d...
2007-04-23, 4642👍, 0💬

How To Write an Array to a File without a File Handle
How To Write an Array to a File without a File Handle? - PHP Script Tips - Reading and Writing Files If you have an array, want to write it to a file, and you don't want to open the file with a file handle, you can use the file_put_contents(). It opens the specified file, writes all values from the ...
2007-04-23, 4642👍, 0💬

How Many Ways to Include Variables in Double-Quoted Strings
How Many Ways to Include Variables in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations There are 3 formats to include variables in double-quoted strings: "part 1 $variable part 2" - This is the simplest format to include a variable in a string. The variable nam...
2007-04-20, 4641👍, 0💬

How To Process the Uploaded Files
How To Process the Uploaded Files? - PHP Script Tips - Uploading Files to Web Servers 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...
2007-04-19, 4640👍, 0💬

What Is a Result Set Object
What Is a Result Set Object? - PHP Script Tips - Working with MySQL Database 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 the result set. Once ...
2007-04-19, 4640👍, 0💬

How To Create a New Table
How To Create a New Table? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts 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 ...
2007-05-10, 4639👍, 0💬

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

How To Pass an Argument to a Function
How To Pass an Argument to a Function? - PHP Script Tips - Creating Your Own Functions To pass an argument to a function, you need to: Add an argument definition in the function definition. Add a value as an argument when invoking the function. Here is a PHP script on how to use arguments in a funct...
2007-04-24, 4632👍, 0💬

How To Insert Rows Based on SELECT Statements
How To Insert Rows Based on SELECT Statements? - PHP Script Tips - Working with MySQL Database If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: &lt;?php include "mysql_connectio...
2007-04-19, 4632👍, 0💬

What Types of Data Can Be Used as Array Keys
What Types of Data Can Be Used as Array Keys? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations Two types of data can be used as array keys: string and integer. When a string is used as a key and the string represent an integer, PHP will convert the string into a integer and us...
2007-04-14, 4631👍, 0💬

How To Include Variables in Double-Quoted Strings
How To Include Variables in Double-Quoted Strings? - PHP Script Tips - Understanding String Literals and Operations 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 ...
2007-04-20, 4630👍, 0💬

<< < 5 6 7 8 9 10 11 >   Sort: Date