· 7 years ago · Oct 05, 2018, 06:20 AM
1<!DOCTYPE html>
2<!--
3To change this license header, choose License Headers in Project Properties.
4To change this template file, choose Tools | Templates
5and open the template in the editor.
6-->
7<html>
8 <head>
9 <meta charset="UTF-8">
10 <title></title>
11 </head>
12 <body>
13 <form >
14
15
16
17
18
19
20 </form>
21 <?php
22 $dbase = 'DB-Iskola';
23 $sql="CREATE DATABASE $dbase"
24 ."CHARACTER SET utf8"
25 ."COLLATE utf8_hungarian_ci;";
26
27 $server ='localhost';
28 $user ='root';
29 $password ='Demo1234';
30
31 $table ='Tanulók';
32
33 if(!$sql)
34 {
35 die('Kapcsolódási hiba');
36 }
37 else
38 {
39 echo('Sikeres kapcsolódás!');
40 }
41
42 $sql2= "CREATE TABLE IF NOT EXISTS $table("
43 ."Vnev VARCHAR(20),"
44 ."Knev VARCHAR(20),"
45 ."Irsz INT(4),"
46 ."Helység VARCHAR(20),"
47 ."CÃm VARHCAR(30),"
48 ."Szülhely VARCHAR(30),"
49 ."Szülidő DATE,"
50 ."Szigszám VARCHAR(20));";
51
52 ?>
53 </body>
54</html>