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
37
38
39
40
41
42
43
44
| <?php // Connecting, selecting database $link = mysql_connect('localhost', '******', '******') or die('Kan niet verbinden: ' . mysql_error()); echo 'Succesvol verbonden!'; mysql_select_db('********') or die('Could not select the database?!'); // Performing SQL query $query = 'CREATE TABLE `applyform` ( `accid` int(10) NOT NULL auto_increment, `username` text NOT NULL, `password` text NOT NULL, `email` text NOT NULL, `team` text NOT NULL, `skills` text NOT NULL, `contribution` text NOT NULL, `board1` text NOT NULL, `referred` text NOT NULL, `stro` text NOT NULL, `message` text NOT NULL, `signup_date` datetime NOT NULL default '0000-00-00 00:00:00', `ip` varchar(20) NOT NULL default '', `posted` int(10) NOT NULL default '0', PRIMARY KEY (`accid`) );'; $result = mysql_query($query) or die('Query mislukt: ' . mysql_error()); // Printing results in HTML echo "<table>\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($line as $col_value) { echo "\t\t<td>$col_value</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> |
Dat heb ik nu dus, met dank aan whoami.
Maar, daarbij krijg ik de volgende error:
code:
1
| Parse error: parse error, unexpected T_LNUMBER in /data/members/paid/n/o/no-f34r.nl/htdocs/www/query.php on line 21 |
Zoals ik al heb gezegt, ik heb totaal geen verstand van PHP...
Het is iets met een nummer, volgens de error, dus `signup_date` datetime NOT NULL default '0000-00-00 00:00:00',.
Wat moet ik doen??
En tjah, over deze error heb ik niets gevonden?