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

How To Create a Database
How To Create a Database? - PHP Script Tips - Working with MySQL Database 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 and delete databases using the CREATE/DROP DATABA...
2007-04-18, 4800👍, 0💬

How To Retrieve Values from the Current Session
How To Retrieve Values from the Current Session? - PHP Script Tips - Understanding and Using Sessions If you know some values have been saved in the session by an other script requested by the same visitor, you can retrieve those values back by using the pre-defined associative array called $_SESSIO...
2007-04-18, 4767👍, 0💬

What Is a Session ID
What Is a Session ID? - PHP Script Tips - Understanding and Using Sessions A session ID is an identification string of a session. Since there might be multiple visitors coming to your Web site at the same time, the PHP engine needs to maintain multiple sessions concurrently. Session IDs are created ...
2007-04-18, 4815👍, 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💬

What Do You Need to Connect PHP to MySQL
What Do You Need to Connect PHP to MySQL? - PHP Script Tips - Working with MySQL Database If you want to access MySQL database server in your PHP script, you need to make sure that MySQL module is installed and turned on in your PHP engine. Check the PHP configuration file, php.ini, to make sure the...
2007-04-18, 4736👍, 0💬

How To Retrieve the Session ID of the Current Session
How To Retrieve the Session ID of the Current Session? - PHP Script Tips - Understanding and Using Sessions Normally, you don't need to know the session ID of the current session. But if you are interested to know the session ID created by the PHP engine, there are two ways to get it: Calling sessio...
2007-04-18, 4713👍, 0💬

How To Install MySQL
How To Install MySQL? - PHP Script Tips - Working with MySQL Database MySQL is an open source database management system developed by MySQL AB, http://www.mysql.com. You can download a copy and install it on your local computer. Here is how you can do this: Go to http://dev.mysql.com/downloads /mysql...
2007-04-18, 4726👍, 0💬

What Are the Options to Transfer Session IDs
What Are the Options to Transfer Session IDs? - PHP Script Tips - Understanding and Using Sessions Once a new session is created, its session ID must be transferred to the client browser and included in the next client request, so that the PHP engine can find the same session created by the same vis...
2007-04-18, 4811👍, 0💬

How To Use MySQL Command Line Interface
How To Use MySQL Command Line Interface? - PHP Script Tips - Working with MySQL Database 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 pro...
2007-04-18, 5291👍, 0💬

How Session IDs Are Transferred on Your Web Server
How Session IDs Are Transferred on Your Web Server? - PHP Script Tips - Understanding and Using Sessions As you know there are two options the PHP engine can use to transfer session IDs to the client browsers. But how to do know which option is your PHP engine is using? The PHP sample script will he...
2007-04-18, 4802👍, 0💬

How To Force the PHP Engine to Use Cookies to Transfer Session IDs
How To Force the PHP Engine to Use Cookies to Transfer Session IDs? - PHP Script Tips - Understanding and Using Sessions If you want to force your PHP engine to use cookies to transfer session IDs instead of URL parameters, you can open the PHP configuration file, php.ini, and make the following cha...
2007-04-18, 5002👍, 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, 4868👍, 0💬

What Is the Timeout Period on Session Values
What Is the Timeout Period on Session Values? - PHP Script Tips - Understanding and Using Sessions 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 ...
2007-04-18, 5098👍, 0💬

How To Test the Session Garbage Collection Process
How To Test the Session Garbage Collection Process? - PHP Script Tips - Understanding and Using Sessions In order to test the session garbage collection process, you need to change the settings to expire session variables in 10 seconds and run the process on every request: session.gc_probability = 1...
2007-04-18, 4928👍, 0💬

How To Set session.gc_divisor Properly
How To Set session.gc_divisor Properly? - PHP Script Tips - Understanding and Using Sessions As you know that session.gc_divisor is the frequency of when the session garbage collection process will be executed. You should set this value based on the income request traffic. Here are some suggestions:...
2007-04-18, 7272👍, 0💬

How To Set session.gc_maxlifetime Properly
How To Set session.gc_maxlifetime Properly? - PHP Script Tips - Understanding and Using Sessions As you know that session.gc_maxlifetime is the session value timeout period. You should set this value based on the usage pattern of your visitors. Here are some suggestions: # Set it to 20 minutes for a...
2007-04-18, 6664👍, 0💬

How To Tell If a Session Is New
How To Tell If a Session Is New? - PHP Script Tips - Understanding and Using Sessions There is not direct way to tell if a session is new or old. But you can design your site to have a required session value in all sessions. Then you can check the existence of this value in a session to determine if...
2007-04-17, 5037👍, 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 Close a Session Properly
How To Close a Session Properly? - PHP Script Tips - Understanding and Using Sessions Let's say you site requires users to login. When a logged in user clicks the logout button, you need to close the session associated with this user properly in 3 steps: Remove all session values with $_SESSION = ar...
2007-04-17, 4806👍, 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 Return a Reference from a Function
How To Return a Reference from a Function? - PHP Script Tips - Creating Your Own Functions To return a reference from a function, you need to: Add the reference operator "&" when defining the function. Add the reference operator "&" when invoking the function. Here is a PHP script on how to ...
2007-04-14, 4709👍, 0💬

What Is session_register()
What Is session_register()? - PHP Script Tips - Understanding and Using Sessions session_register() is old function that registers global variables into the current session. You should stop using session_register() and use array $_SESSION to save values into the current session now.
2007-04-14, 5288👍, 0💬

How To Loop through an Array without Using "foreach"
How To Loop through an Array without Using "foreach"? - PHP Script Tips - PHP Built-in Functions for Arrays PHP offers the following functions to allow you loop through an array without using the "foreach" statement: reset($array) - Moves the array internal pointer to the first value of the array an...
2007-04-14, 4811👍, 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💬

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