Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-Control" content="no-cache">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="Lang" content="en">
- <meta name="author" content="">
- <meta http-equiv="Reply-to" content="@.com">
- <meta name="generator" content="PhpED 5.8">
- <meta name="description" content="">
- <meta name="keywords" content="">
- <meta name="creation-date" content="01/01/2009">
- <meta name="revisit-after" content="15 days">
- <title>Untitled</title>
- <link rel="stylesheet" type="text/css" href="my.css">
- </head>
- <body>
- <input type="button" name="EditBtn" value="Personer" class="form" onClick="Test1()">
- <?php
- // Koble til v�r MYSQL SERVER/ APACHE SERVER
- $dbuser="gege";
- $dbpass="gege123";
- $dbname="trendofoslo"; //the name of the database
- $chandle = mysql_connect("localhost", $dbuser, $dbpass)
- or die("Connection Failure to Database");
- echo "Connected to database server<br>";
- // Koble til v�r Database som er i Apache server.
- mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found." . $dbuser);
- echo "Database " . $trendofoslo . " is selected<br><br>";
- // HENTE UT INFORMASJON
- mysql_select_db("trendofoslo", $chandle);
- $result = mysql_query("SELECT FirstName, LastName FROM Person");
- function Test1(){
- while($row = mysql_fetch_array($result))
- {
- echo $row['FirstName'] . " " . $row['LastName'];
- echo "<br><br><br>";
- }
- $result1 = mysql_query("SELECT klubbid, knavn, kadresse FROM klubber");
- while($row = mysql_fetch_array($result1))
- {
- echo $row['klubbid'] . " " . $row['knavn'] . " " . $row ['kadresse'];
- echo "<br>";
- }
- echo "test1";
- }
- mysql_close($chandle);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement