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: 2008/04/18 14:00 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki