BCS website placeholder and testbed (circa Nov 2003)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

45 lines
835 B

  1. <?php // initialize our db variables
  2. $domain = "olivebranchms.com";
  3. $host = "localhost";
  4. $user = "admin";
  5. $passwd = "Dr8886UN";
  6. $dbname = "olivebranchms";
  7. // define our generic db calls for use with mysql
  8. function connect($host, $dbname) {
  9. global $user, $passwd;
  10. $link = mysql_connect($host,$user,$passwd);
  11. if(mysql_select_db($dbname,$link)) {
  12. return($link);
  13. }
  14. }
  15. function query($link, $query) {
  16. $result = mysql_query($query, $link);
  17. return($result);
  18. }
  19. function numrows($result) {
  20. $count = mysql_num_rows($result);
  21. return($count);
  22. }
  23. function fetch_object($result, $row) {
  24. $data = mysql_fetch_object($result);
  25. return($data);
  26. }
  27. function free_result($result) {
  28. mysql_free_result($result);
  29. }
  30. function close($link) {
  31. mysql_close($link);
  32. }
  33. function error($link) {
  34. return(mysql_error());
  35. }
  36. ?>