PHP MySQL Starting Point


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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);

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.