Professional Documents
Culture Documents
PHP Kod Unos Studenata
PHP Kod Unos Studenata
php
if (isset($_POST['unos']))
{
include('connect-mysql.php');
$ime = $_POST['ime'];
$prezime = $_POST['prezime'];
$indeks = $_POST['indeks'];
if ($ime == "" || $prezime == "" || $indeks == "")
{
}
else
{
mysql_query("INSERT INTO register(ime, prezime, indeks)
VALUES('$ime', '$prezime', '$indeks')");
}
}
? >
<html id = "html">
<head>
<link rel = "stylesheet" type = "text/css" href = "pohrana_podataka.css"
< / head>
<body>
<div id = "all">
}
else
{
echo '<html>
<img src = "true.png" alt = "Mountain View" style =
"width:30px;height:30px;">
< / html><br>';
echo $newrecord1."<br>";
echo $newrecord2."<br>";
? >
< / fieldset>
< / form>
<div class = "div"><fieldset class = "fieldset4">
< ? php if ($ime == "Ime" && $prezime == "Prezime" || $ime == "ime" && $prezime ==
"prezime" || $ime == "IME" && $prezime == "PREZIME")
{
echo '<html>
<img src = "osoba.jpg" alt = "Mountain View" style =
"width:304px;height:228px;">
< / html><br>';
}
else
{
echo '<html>
<img src = "student.png" alt = "Mountain View" style =
"width:304px;height:228px;">
< / html><br>';
} ? >
< / fieldset>< / div>
<div>
<table id = "tabela1" border = "1">
<tr class = "celija">
<th class = "celija1">ID< / th>
<th class = "celija2">Ime< / th>
<th class = "celija2">Prezime< / th>
<th class = "celija3">Broj indeksa< / th>
< / tr>
< ? php
? >
< / table>
< / div>
< / div>
< / body>
< / html>