Posted By

jrphelps on 11/08/07


Tagged

mysql php


Versions (?)

Who likes this?

12 people have marked this snippet as a favorite

jrphelps
vali29
basicmagic
heinz1959
willcodeforfood
jeff
pixelhandler
jprice
Hollow
love
robfahy
clac


PHP MySQL Starting Point


 / Published in: PHP
 

URL: http://www.freewebmasterhelp.com/tutorials/phpmysql/4

  1. $username="username";
  2. $password="password";
  3. $database="your_database";
  4. $table="your_table";
  5.  
  6. mysql_connect(localhost,$username,$password);
  7. @mysql_select_db($database) or die( "Unable to select database");
  8. $query="SELECT * FROM $table";
  9. $result=mysql_query($query);

Report this snippet  

You need to login to post a comment.