index.php
Gesponsorde koppelingen
PHP script bestanden
<html>
<head>
<title>Quotes</title>
</head>
<body>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?PHP
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql = "SELECT quote FROM quotes ORDER BY RAND() LIMIT 0,1";
$res = mysql_query($sql);
if (mysql_num_rows($res) >= 1)
echo mysql_result($res, 0);
$sql = "SELECT quote FROM quotes ORDER BY RAND() LIMIT 0,1";
$res = mysql_query($sql);
echo "<br /><br />";
if (mysql_num_rows($res) >= 1){
echo mysql_result($res, 0);
}
?>
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql = "SELECT quote FROM quotes ORDER BY RAND() LIMIT 0,1";
$res = mysql_query($sql);
if (mysql_num_rows($res) >= 1)
echo mysql_result($res, 0);
$sql = "SELECT quote FROM quotes ORDER BY RAND() LIMIT 0,1";
$res = mysql_query($sql);
echo "<br /><br />";
if (mysql_num_rows($res) >= 1){
echo mysql_result($res, 0);
}
?>
</body>
</html>