Na deze topics:
[PHP + MySQL] Zoekmachine
[HTML > PHP > MySQL] Communicatie fout?
Beiden zitten nu op slot...
Nog steeds werkt het niet en zit ik vast in het volgende bestand:
instert.php
Ik ben er dus ook achter gekomen dat sinds een update na 4.1.x (zoiets) er iets veranderd is in de werking van PHP. ik draai versie 4.2.3 en het werkt dus niet. Ik ben verschillende sites afgegaan.
Allen geen verandering in werking en/of foutmelding.
Geeft:
Geeft:
Geeft:
Geeft:
[PHP + MySQL] Zoekmachine
[HTML > PHP > MySQL] Communicatie fout?
Beiden zitten nu op slot...
Nog steeds werkt het niet en zit ik vast in het volgende bestand:
instert.php
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| <? $username="ODBC"; $password=""; $database="testing"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); Print "\"$database\" geopend!"; Echo "<P>"; $query = INSERT INTO contacts VALUES ($HTTP_POST_VARS['$first'],$HTTP_POST_VARS['$last'],$HTTP_POST_VARS['$phone'],$HTTP_POST_VARS['$mobile'],$HTTP_POST_VARS['$fax'],$HTTP_POST_VARS['$email'],$HTTP_POST_VARS['$web'])" or die( "Unable to insert into database"); Print "Invoeren van \"$first $last $phone $mobile $fax $email $web\" gelukt!"; ini_set('error_reporting', E_ALL); mysql_query($query); mysql_close(); ?> |
Ik ben er dus ook achter gekomen dat sinds een update na 4.1.x (zoiets) er iets veranderd is in de werking van PHP. ik draai versie 4.2.3 en het werkt dus niet. Ik ben verschillende sites afgegaan.
PHP:
1
| $first |
PHP:
1
| $_POST['$first'] |
PHP:
1
| $HTTP_POST_VARS['first'] |
PHP:
1
| '".$HTTP_POST_VARS['first']."' |
Allen geen verandering in werking en/of foutmelding.
PHP:
1
| "INSERT INTO contacts VALUES ('',$_POST['$first'],$_POST['$last'],$_POST['$phone'],$_POST['$mobile'],$_POST['$fax'],$_POST['$email'],$_POST['$web')" |
Geeft:
code:
1
| Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\phpdev\www\insert.php on line 13 |
PHP:
1
| INSERT INTO contacts VALUES ('',$_POST['$first'],$_POST['$last'],$_POST['$phone'],$_POST['$mobile'],$_POST['$fax'],$_POST['$email'],$_POST['$web') |
Geeft:
code:
1
| Parse error: parse error in c:\phpdev\www\insert.php on line 13 |
PHP:
1
| $query = INSERT INTO contacts VALUES ($HTTP_POST_VARS['$first'] = 'first',$HTTP_POST_VARS['$last'] = 'last',$HTTP_POST_VARS['$phone'] = 'phone',$HTTP_POST_VARS['$mobile'] = 'mobile',$HTTP_POST_VARS['$fax'] = 'fax',$HTTP_POST_VARS['$email'] = 'email',$HTTP_POST_VARS['$web'] = 'web') |
Geeft:
code:
1
| Parse error: parse error in c:\phpdev\www\insert.php on line 13 |
PHP:
1
| $query = INSERT INTO contacts VALUES ($HTTP_POST_VARS['$first'].$HTTP_POST_VARS['$last'].$HTTP_POST_VARS['$phone'].$HTTP_POST_VARS['$mobile'].$HTTP_POST_VARS['$fax'].$HTTP_POST_VARS['$email'].$HTTP_POST_VARS['$web']); |
Geeft:
code:
1
| Parse error: parse error in c:\phpdev\www\insert.php on line 13 |
[ Voor 16% gewijzigd door vegterb op 19-05-2004 12:44 ]
My Laptop Specificaties vs My Desktop Specificaties