Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to a Database

Status
Not open for further replies.

calculus

Programmer
Apr 10, 2003
390
US
Let me start by saying I'm new to PHP. I've figured out some of the basics, but I need to create and connect to a database on a Unix system (I actually have the database created, I just need to re-shape it).

If someone could give me the connection string and maybe some basics about database manipulation like MoveFirst, MoveNext, SQL example, add field, then I'm sure I could be on my way quickly.

Eventually this database will drive web pages based on user selections.

Your assistance to a rookie is greatly appreciated.

calculus
 
Sorry,

PHP is running on a Unix server. It is MySQL.
 
to connect i use this

$hostname_connectionName = "localhost";
$database_connectionName= "database name";
$username_connectionName= "username";
$password_connectionName= "password";
$connectionName= mysql_pconnect($hostname_connectionName, $username_connectionName, $password_connectionName) or die(mysql_error());

<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top