Guest User

Untitled

a guest
Jun 30th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php
  2.  
  3. //connection to MYSQL Database
  4. //Function called in external scripts
  5.  
  6. function DBConnect(){
  7.  
  8. //add further global vars at the end of the line below once you have created them in the database tool
  9.  
  10. global $TestDBConnection, $Host, $User, $Password, $DBName, $Table_1; $id; $firstname; $lastname; $email; $phone; $question;
  11.  
  12. $Host="localhost";
  13. $User="k0185005";
  14. $Password="bx2ZTpqa";
  15. $DBName="k0185005";
  16.  
  17. //add links to your new tables here aswell
  18.  
  19. $Table_1="Contact";
  20.  
  21.  
  22. //comment out this block when connection is successful!
  23.  
  24. /*if(mysql_connect($Host, $User, $Password)){
  25. print "connection active !";
  26. }else{
  27. print "connection error! please check details in common.php!";
  28. }*/
  29.  
  30. } //close function
  31.  
  32.  
  33.  
  34. ?>
Add Comment
Please, Sign In to add comment