Hi,

I'm beginning to learn PHP/MySQL, i have problem 'parse error' when using 
'mysql_query' although it was simple code, like this :

=====
1 <?php
2 $host = localhost;
3 $user = root;
4 $pass = alpha;
5 $konek = mysql_connect("$host","$user","$pass");
6  if (!$konek) {
7   die ('failed'.mysql_error());
8   }
9  echo 'Connect';
10 $dbname = testdb;
11  
12 $db = mysql_select_db ("$dbname",$konek);
13 if (!$db) {
14  die ('not connect'.mysql_error());
15  }
16 echo 'ok' 
17 $query = mysql_query("select * from clients",$konek);
18 ?
======

Parse error: parse error, expecting `','' or `';'' in d:\www\test\refer1.php on 
line 17

 

Can anyone help me to explain this problem

Thanks in advance

Reply via email to