Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi
I cannot retrieve data from the database.
I use the following code and get the following error in the browser:
[b]Parse error: parse error in g:\programs(2)\easyphp1-8\www\ha\readarticle.php on line 11[/b]
code:Code: Select all
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("articles") or die(mysql_error());
$query="SELECT * FROM articles WHERE id='1'";
$result=mysql_query($query);
$row = mysql_fetch_array( $result );
echo $row=['text']."-". $row=['subject'] ;
mysql_close();
?>echo $row=['text']."-". $row=['subject'] ;
thanks for your help
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]