PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| <? <html> <head> <title>films</title> </head> <body> <h1>films</h1> <? if (!$Titel || !$Genre) { echo "Niet alles in ingevuld.<br>" ."Probeer het nog eens."; exit; } $Titel = addslashes($Titel); $Genre = addslashes($Genre); @ $db = mysql_pconnect("localhost", "root ", ""); if (!$db) { echo "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db("Filmhuis"); $query = "insert into films values ('".$Titel."', '".$Genre."')"; $result = mysql_query($query); if ($result) echo mysql_affected_rows()." Film toegevoegd aan de database"; ?> </body> </html> ?> |
ok, als ik dit uitvoer met dit bestandje dan krijg ik de foutmelding dat de variabele "Titel" niet gedefinieerd is..
Hoe doe ik dat zodat het wel werkt.?? waar zit de fout??