We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

jrphelps on 11/08/07


Tagged

mysql php


Versions (?)


Who likes this?

8 people have marked this snippet as a favorite

jrphelps
vali29
basicmagic
heinz1959
willcodeforfood
jeff
pixelhandler
jprice


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.