Table of Contents

Syntax

boolean mysql_change_user(string $user, string $password [, string $database [, resource $res ]])

This function is deprecated and no longer exists in PHP

(PHP 3)

$user The database user name.
$password The database user password.
$database The database host name.
$res The database connection resource that we want to modify.
RETURNS True on success, False otherwise.

What it Does

Changes the logged-in user for the database connection ($res) specified.

This function is deprecated and no longer exists in PHP*

Example

// open the mysql resource
$res = mysql_connect($server, $user, $pass);
 
// close the mysql resource
if (!mysql_change_user($user2, $pass2))
    echo 'Attempt to change user for DB connection failed';
 
mysql_change_user.txt · Last modified: Apr 18, 2008 - 2:00pm (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki