Monday, July 6, 2009

using class connect to data in php

ex: class in phphost=$host;$this->user=$user;$this->pass=$pass;$this->data=$data;}function ketnoihost(){$this->cnn=mysql_connect($this->host,$this->user,$this->pass) or die (mysql_error());echo"ket noi host ok";}function ketnoidb(){mysql_select_db($this->data,$this->cnn) or die (mysql_error());

No comments:

Post a Comment