note 102296 added to language.oop5.basic

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
class dbConnect{
	
	public $host = "localhost";
	public $user;
	private $pwd;
	protected $name;
	
	function dbConnect($dbHost, $dbUser, $dbPwd, $dbName)
	{
		$this->host = $dbHost;
		$this->user = $dbUser;
		$this->pwd = $dbPwd;
		$this->name = $dbName;
		
	}// Class Constructor Function
	
	function Connect(){
		$con = mysql_connect($this->host, $this->user, $this->pwd);
		if($con)
		{
			mysql_select_db($this->name) or die(mysql_error());
		}
	return $con;
	}	
}

//Define variables required for database connection
$host = "localhost";
$user = "said";
$pwd = "";
$name = "";

//Instance of the dbConnect class
$Connect = new dbConnect($host, $user, $pwd, $name);

$Connect -> Connect();
----
Server IP: 69.147.83.197
Probable Submitter: 41.59.0.157
----
Manual Page -- http://www.php.net/manual/en/language.oop5.basic.php
Edit        -- https://master.php.net/note/edit/102296
Del: integrated  -- https://master.php.net/note/delete/102296/integrated
Del: useless     -- https://master.php.net/note/delete/102296/useless
Del: bad code    -- https://master.php.net/note/delete/102296/bad+code
Del: spam        -- https://master.php.net/note/delete/102296/spam
Del: non-english -- https://master.php.net/note/delete/102296/non-english
Del: in docs     -- https://master.php.net/note/delete/102296/in+docs
Del: other reasons-- https://master.php.net/note/delete/102296
Reject      -- https://master.php.net/note/reject/102296
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.