Dǝve Derıso

Mysql is a database language. Writing working php scripts for it is about as entertaining as navigating the VA bureaucracy. It blows.

I wanted to move the whole inventory site over to Koso. But after an hour of trying to get the Koso server to try and access my server’s msql database, I decided to say screw it and wrote an iframe script to just port the whole site into one html file on Koso.

Iframes are also lame. I couldn’t get the site to fill the whole screen, it would be a small box in the corner. Soooo, I wrote a java script. Failed. Wrote an HTML scritpt. Failed. Finally, good ol’ CSS fixed it. Now its up!

The only way I can to connect to my damn Mysql database is to use ‘localhost’:

<?php
include("variables.php");
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database"); 
echo 'Connected successfully';
mysql_close();
?> 

The only way I could get the iFRAME to work was to use CSS:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

  <title>Paulus Lab Inventory</title>
	
  <style type="text/css" media="screen">
  html, body {
     position: absolute;
     height: 100%;
     max-height: 100%;
     width: 100%;
     margin: 0;
     padding: 0;
   }
   iframe {
     position: absolute;
     height: 100%;
     width: 100%;
     border: none;
   }
   #container {
     position: absolute;
    top: 0; 
	bottom: 0;
     width: 100%;
     overflow: hidden ;
   }
}
  </style>
	
</head>

<body>
  <div id="container">
    <iframe src="http://www.yoursite.com/yourdatabase.php" FRAMEBORDER="0"></iframe>
  </div>

</body>
</html>
Designed By Dave Deriso © 2010