0

i've been attempting to execute this code , all i got was an error.

<?php

$connect = mysql_connect("localhost","root","") or die ("connection failed!");
mysql_select_db("users") or die (mysql_error());


echo "connected!"

$extract = mysql_query("select * from member order by id ASC") or die mysql_error();



?>

and this error appeared : Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\xampp\htdocs\xampp\connection1.php on line 9 anybody know why? thanks in advance.

Edited by backalley: n/a

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by tomato.pgn
0

try:

<?php

$connect = mysql_connect("localhost","root","") or die ("connection failed!");
mysql_select_db("users") or die (mysql_error());


echo "connected!"

$recordset = mysql_query("select * from member order by id ASC") or die( mysql_error());
$row=mysql_fetch_assoc($recordset);
extract( $row );



?>

Edited by hielo: n/a

0

try:

<?php

$connect = mysql_connect("localhost","root","") or die ("connection failed!");
mysql_select_db("users") or die (mysql_error());


echo "connected!"

$recordset = mysql_query("select * from member order by id ASC") or die( mysql_error());
$row=mysql_fetch_assoc($recordset);
extract( $row );



?>

thanks it works! though i forgot the semicolon ;

0

You missed semicolon in 7th line.....check it...

echo "connected!";

PS-Don't forget to mark the thread as read if your problem is solved...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.