Advertisement
Guest User

Site / Config

a guest
Mar 24th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?
  2. $host = "localhost";
  3. $dbname = "induedun_chand02s";
  4. $dbusername = "induedun_chedu";
  5. $dbpassword = '?!l1neoB-iE#';
  6.  
  7.  
  8. function db_connect()
  9. {
  10. global $host,$dbusername,$dbpassword,$dbname;
  11. if(!($link_id=mysql_pconnect($host,$dbusername,$dbpassword)))
  12. {
  13. echo("error connecting to host");
  14. exit();
  15. }
  16. if(!mysql_select_db($dbname,$link_id))
  17. {
  18. echo("error in selecting the database");
  19. echo(sprintf("Error : %d %s",mysql_errno($link_id),mysql_error($link_id)));
  20. }
  21. return $link_id;
  22. }//function
  23.  
  24. $link_id = db_connect();
  25.  
  26. $qxresult=mysql_query("select comp_name from comp_name WHERE id='1' limit 1");
  27. $qxrow=mysql_fetch_array($qxresult);
  28.  
  29. $sitename=$qxrow[comp_name];
  30. ?>
  31.  
  32. site : http://chandrabinduedu.com/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement