One page PHP with multiple MS databases

Source: Internet
Author: User

<?PHP/*Add script parameter: u= user name v= city name Add City tag for user*/Header("content-type:text/html; Charset=utf-8 ");/*$server = "123.7.63.176";  Server IP address, if local, can be written as Localhost$uid = "NXTYJS"; User name $pwd = "[Email protected]#";  Password $database = "AAA"; MS Database name $conn =mssql_connect ($server, $uid, $pwd) or Die ("Connect Failed"); mssql_select_db ($database, $conn);*///Get pass Value$u=$_post[' U '];$v=$_post[' V '];/*//Display the user data in my to facilitate the addition of reference $a= $CNX->query ("SELECT * from Ofgroupuser"), foreach ($a as $b) {//print_r ($myrow);//echo "& Lt;br> "echo"-------------------------------------"echo" <br> "echo" OpenFire username >>>>> "; Var_dump ($b); Print_r ($a [' username '); echo "<br>"; echo "-------------------------------------";}*/$CNX=NewPDO ("Odbc:driver={sql Server}; Server=123.7.63.176;database=openfire; ", ' Nxtyjs ', ' [email protected]# ');//establish the first connection$a=$CNX->query ("SELECT * from Ofgroupuser");foreach($a  as $b)    {        Echo"-------------------------------------";Echo"<br>";Echo"User name >>>>> in OpenFire";//Var_dump ($b);Print_r($b[' username ']);Echo"<br>";Echo"-------------------------------------"; }Echo"<br>";Echo"<br>";Echo"|||||||||||||||||||||||||||||||||||||||||||||| Add City Tags | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |;Echo"<br>";Echo"<br>";Echo"<br>";Echo"<form name= ' form ' method= ' post ' action= ' >";Echo"User: <input type= ' text ' name= ' U ' >";Echo"&nbsp;&nbsp;";Echo"City tag: <input type= ' text ' name= ' V ' >";Echo"&nbsp;&nbsp;";Echo"<input type= ' submit ' value= ' >";Echo"</form>";Echo"<br>";Echo"||||||||||||||||||||||||||||||| Expand the data in the database | | | | | | | | | | | | | | | | | | | | | | | |;Echo"<br>";Echo"<br>";//Print_r ($u);//print_r ($v);/*//Query the data $hang= the row of my keywords $result = mysql_query ("select * from Ofgroupuser where username like '". $u. "' ");//loop insert my row data and get value to Ms while ($row = Mysql_fetch_array ($hang)) {$query 123 = ' INSERT into Guanlian (uer,goup,visty) VALUES (n ' ". $row [' username ']." ', N ' ". $row [' GroupName ']." ', ' ". $v." ') ";  $haha =mssql_query ($query 123); }*///Query MS Results$CNX=NewPDO ("Odbc:driver={sql Server}; server=123.7.63.176;database=aaa; ", ' Nxtyjs ', ' [email protected]# ');//Establish a second connection$row=$CNX->query ("SELECT * from Guanlian");foreach($row  as $list){Echo"----------------------------------------------------------------------------------";Echo"<br>"; Echo"ID:"; Print_r($list[' ID ']); Echo"|"; Echo"&nbsp;&nbsp;"; Echo"User:"; Print_r($list[' Uer ']); Echo"|"; Echo"&nbsp;&nbsp;"; Echo"Group:"; Print_r($list[' Goup ']); Echo"|"; Echo"&nbsp;&nbsp;"; Echo"City:"; Print_r($list[' Visty ']); Echo"|"; Echo"&nbsp;&nbsp;"; Echo"<br>"; Echo"----------------------------------------------------------------------------------";Echo"<br>";}?>

One page PHP with multiple MS databases

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.