een newbie vraagje,
bij code krijg ik een fout melding iemand die ziet waar ik de fout in ga?? alvast bedankt
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in R:\htdocs\users\sql.php on line 15
bij code krijg ik een fout melding iemand die ziet waar ik de fout in ga?? alvast bedankt
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in R:\htdocs\users\sql.php on line 15
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
| print ("<form name='form' action='sql.php' method='get'>"); print (" <input type='text' name='q' />"); print (" <input type='submit' name='Submit' value='Zoeken' />"); print ("</form>"); // Get the search variable from URL print ("<body bgcolor='#FFFFFF'>"); print ("<table width='85%' border='0' cellspacing='1' cellpadding='1' bgcolor='#FFFFFF'>"); print ("<tr bgcolor='#CCddFF'>"); print("<td height='22'><b>nummer</b></td>"); print ("<td height='22'><b>zoeknaam</b></td>"); print ("<td height='22'><b>naam</b></td>"); print ("</tr>"); $cx=odbc_pconnect("dsn","user","password",""); $cur=odbc_exec($cx,"SELECT * FROM Adressen WHERE zoeknaam Like ".$_GET['q']""); while(odbc_fetch_row($cur)) { //collect results $nummer=odbc_result($cur,1); $zoeknaam=odbc_result($cur,2); $naam=odbc_result($cur,3); print ("<tr>"); print ("<td>$nummer</td>"); print ("<td>$zoeknaam</td>"); print ("<td>$naam</td>"); print ("</tr>"); } print ("</table>"); //disconnect from database odbc_close($cx); |
[ Voor 33% gewijzigd door perexerep op 26-08-2005 14:39 . Reden: typo ]