This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tallrekke = array(1,4,8,1,4,10,5,6,2,4,6); | |
/* | |
$mintse = 0; | |
foreach ($tallrekke as $tall){ | |
if ($tall < $minste){ | |
$minste = $tall; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE competitor | |
( | |
competitorID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, | |
name VARCHAR(40) NOT NULL, | |
surname VARCHAR(40) NOT NULL, | |
nationality VARCHAR(40) NOT NULL | |
); | |
CREATE TABLE vm.audience | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table Ovelse2( | |
OvelseNr int(2) auto_increment, | |
Betegnelse varchar(20), | |
Dato varchar(10), | |
Tid varchar(5), | |
Sted varchar(20), | |
PRIMARY KEY(OvelseNr) | |
); | |
create table Publikum2( | |
PublikumsNr int(3) auto_increment, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head > | |
<meta charset="UTF-8"> | |
<title>Oblig 2</title> | |
</head> | |
<body> | |
<form action="" method="post"> | |
<input type="submit" name="publikum" value="Publikum"/> | |
<input type="submit" name="deltaker" value="Deltaker"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head > | |
<meta charset="UTF-8"> | |
<title>Oblig 2</title> | |
</head> | |
<body> | |
<form action="" method="post"> | |
<input type="submit" name="publikum" value="Publikum"/> | |
<input type="submit" name="deltaker" value="Deltaker"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST["next"])) { | |
$db=mysqli_connect("localhost","root","","VM"); | |
if(!$db) { | |
die("Feil i knytning til databasen!"); | |
} | |
else | |
{ | |
echo "knyttet til databse! <br>"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Copyright Dan Eig | |
// funksjoner | |
function visOvelser() | |
{ | |
/** Koble til DB **/ | |
$db = new mysqli("cube.iu.hio.no","s155722","","s155722"); | |
if(!$db) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = new mysqli(); | |
if(isset($_POST["next"])) { | |
$db = mysqli_connect("localhost", "root", "", "VM"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = new mysqli(); | |
if(isset($_POST["next"])) { | |
$db = mysqli_connect("localhost", "root", "", "VM"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = new mysqli(); | |
if(isset($_POST["next"])) { | |
$db = mysqli_connect("localhost", "root", "", "VM"); |
OlderNewer