Advertisement
Guest User

Untitled

a guest
May 16th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.92 KB | None | 0 0
  1. <html>
  2.  
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  5. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  6. <meta name="ProgId" content="FrontPage.Editor.Document">
  7. <title>Web Templates by LINE9.com</title>
  8. </head>
  9.  
  10. <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">
  11.  
  12. <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#999966">
  13.   <tr>
  14.     <td width="100%"><font face="Arial Black" size="6" color="#000000">WELCOME TO X-TREME'S SITE FOR ALMOST ANYTHING!</font></td>
  15.   </tr>
  16. </table>
  17. <table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">
  18.   <tr>
  19.     <td width="100%"><font color="#FFFFFF" face="Arial" size="2"><b>XTREME.IT.CX</b></font></td>
  20.   </tr>
  21. </table>
  22. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  23.   <tr>
  24.     <td width="18%" bgcolor="#999966" valign="top">&nbsp;
  25.       <p style="margin-left: 20"><b><font face="Arial" size="2" color="#000000"><aHome<br>
  26.       LINK 2<br>
  27.       LINK 3<br>
  28.       LINK 4<br>
  29.       LINK 5<br>
  30.       LINK 6</font></b></p>
  31.       <p>&nbsp;</p>
  32.       <p>&nbsp; </p>
  33.       <p>&nbsp;</p>
  34.       <p>&nbsp; </p>
  35.       <p>&nbsp;</td>
  36.     <td width="61%" valign="top">
  37.       <blockquote>
  38.         <p><br>
  39.         <font face="Arial" size="5">Welcome</font></p>
  40.         <p><font size="2" face="Arial">This is the area for your Welcome text.
  41.         This is the area for your Welcome text. This is the area for your
  42.         Welcome text. This is the area for your Welcome text. This is the area
  43.         for your Welcome text. This is the area for your Welcome text. This is
  44.         the area for your Welcome text. This is the area for your Welcome text.
  45.         This is the area for your Welcome text. </font></p>
  46.         <p><font face="Arial" size="5">Header 2</font></p>
  47.         <p><font size="2" face="Arial">This is the area for your Welcome text.
  48.         This is the area for your Welcome text. This is the area for your
  49.         Welcome text. This is the area for your Welcome text. This is the area
  50.         for your Welcome text. This is the area for your Welcome text. This is
  51.         the area for your Welcome text. This is the area for your Welcome text.
  52.         This is the area for your Welcome text. </font></p>
  53.         <p>&nbsp;</p>
  54.         <p>&nbsp;</p>
  55.         <p>&nbsp;</p>
  56.       </blockquote>
  57.       <p align="center"><font face="Arial" size="1">© COPYRIGHT 2010 ALL RIGHTS
  58.       RESERVED XTREME.IT.CX</font></td>
  59.     <td width="21%" valign="top">
  60.       <table border="0" width="100%" cellspacing="0" cellpadding="0">
  61.         <tr>
  62.           <td width="100%" bgcolor="#999966"><b><font face="Arial" size="2" color="#FFFFFF">SIDE
  63.             HEADING 1</font></b></td>
  64.         </tr>
  65.       </table>
  66.       <table border="0" width="100%" cellspacing="0" cellpadding="0">
  67.         <tr>
  68.           <td width="100%" bgcolor="#EEEECC"><br>
  69.             <font size="2" face="Arial">This is the place for your news or other
  70.             site information. Another good use for this space is to display
  71.             advertisements.</font>
  72.             <p><font size="2" face="Arial">This is the place for your news or
  73.             other site information. Another good use for this space is to
  74.             display advertisements.<br>
  75.             &nbsp;</font></td>
  76.         </tr>
  77.       </table>
  78.       <table border="0" width="100%" bgcolor="#008080" cellspacing="0" cellpadding="0">
  79.         <tr>
  80.           <td width="100%" bgcolor="#999966"><b><font face="Arial" size="2" color="#FFFFFF">SIDE
  81.             HEADING 2</font></b></td>
  82.         </tr>
  83.       </table>
  84.       <table border="0" width="100%" cellspacing="0" cellpadding="0">
  85.         <tr>
  86.           <td width="100%" bgcolor="#EEEECC"><br>
  87.  
  88. </td>
  89.         </tr>
  90.       </table>
  91.     </td>
  92.   </tr>
  93. </table>
  94. <table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">
  95.   <tr>
  96.     <td width="100%"><font size="1">&nbsp;</font></td>
  97.   </tr>
  98. </table>
  99.  
  100. </body>
  101. <?php
  102. $host="sql213.xtreemhost.com"; // Host name
  103. $username="xth_4992614"; // Mysql username
  104. $password="mario64"; // Mysql password
  105. $db_name="xth_4992614_stuff"; // Database name
  106. $tbl_name="counter"; // Table name
  107.  
  108. // Connect to server and select database.
  109. mysql_connect("$host", "$username", "$password")or die("cannot connect to server ");
  110. mysql_select_db("$db_name")or die("cannot select DB")
  111.  
  112. $sql="SELECT * FROM $tbl_name";
  113. $result=mysql_query($sql);
  114.  
  115. $rows=mysql_fetch_array($result);
  116. $counter=$rows['counter'];
  117.  
  118. // if have no counter value set counter = 1
  119. if(empty($counter)){
  120. $counter=1;
  121. $sql1="INSERT INTO $tbl_name(counter) VALUES('$counter')";
  122. $result1=mysql_query($sql1);
  123. }
  124.  
  125. echo "You 're visitors No. ";
  126. echo $counter;
  127.  
  128. // count more value
  129. $addcounter=$counter+1;
  130. $sql2="update $tbl_name set counter='$addcounter'";
  131. $result2=mysql_query($sql2);
  132.  
  133. mysql_close();
  134. ?>
  135.  
  136. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement