Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*** mysql hostname ***/
- $hostname = 'localhost';
- /*** mysql username ***/
- $username = 'emmiose_aloevera';
- /*** mysql password ***/
- $password = '************';
- $dbname = 'emmiose_aloevera';
- $link = connect($hostname, $username,$password);
- function connect($dbname, $username, $password){
- $link = @mysql_connect($dbname, $username, $password);
- if (!$link)
- die("Could not connect: ".mysql_error());
- else{
- $db = mysql_select_db(DB);
- if(!$db)
- die("Could not select database: ".mysql_error());
- else return $link;
- }
- }
- function getContent($link){
- $res = @mysql_query("SELECT * FROM stalkers", $link);
- if(!$res)
- die("Error: ".mysql_error());
- else
- return $res;
- }
- getContent($link);
- ?>
Add Comment
Please, Sign In to add comment