skip to main | skip to sidebar
jaw Collection

How to connect MySQL from PHP

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

Posted by Jawaad Alkaff Date 14.12.07  

Category: mysql, php, snippet

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Labels

  • php (18)
  • mysql (7)
  • snippet (5)
  • javascript (4)
  • ajax (1)
  • cpanel (1)
  • cron (1)
  • csv (1)
  • java (1)

Sponsored

What PHP Framework do you use?

About Me

My photo
Jawaad Alkaff
Jakarta, DKI, Indonesia
Freelance programmer. PHP/MySQL.
View my complete profile

Porto Folio

  • Me
  • Arrahmah
  • Tifar
  • Forbisaku
  • FPGM
  • Zestos (archived)
  • Megakarir
  • Elkaff
  • Nusansifor

Blog Archive

  • ►  2008 (1)
    • ►  August (1)
  • ▼  2007 (24)
    • ▼  December (11)
      • Java hex2text convert
      • Convert HEX2TEXT
      • PHP insert blob and update blob MySQL
      • How to Protect from double posting insert MySQL
      • How to connect MySQL from PHP
      • PHP br2nl function
      • How to detect browser no flash give alternate with...
      • How to pick a complex string from MySQL
      • PHP Cut string from MySQL
      • Insert and Select doing in MySQL from SQL Injection
      • Convert TEXT2HEX
    • ►  November (3)
    • ►  July (5)
    • ►  June (5)
  • ►  2006 (1)
    • ►  November (1)

My Email Address

My Email Address