Hi Micella

You need to either slash-escape your insert query or use single quotes:

$query="insert into dene (day,start_time) values (\"2003.09.25\",\"22:30\") " ;

or

$query="insert into dene (day,start_time) values ('2003.09.25','22:30') " ;


steve


M|cella Erdem Efe wrote:

I am a new programmer of PHP4.3.3 an MySql 3.23 .

When below script is executed
   "Parse error: parse error, unexpected T_DNUMBER in c:\program
files\apache group\apache\htdocs\ilkdeneme21.php on line 17"
is being seen.

This may be very simple but I could not solve it.Could you help me for this
error?
Thanks for your attention....
[EMAIL PROTECTED]


<? $dbname = 'mycmpe';

mysql_connect("localhost","username");
if (mysql_select_db($dbname))
{ echo "connected";}
else
{ echo "not connected";}

$query="insert into dene (day,start_time) values ("2003.09.25","22:30") " ;
  $result=mysql_query($query);
  if ($result))
{ echo "data girildi";}
else
{ echo "data girilemedi";
 exit;}

?>




-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to