I'm getting a T_VARIABLE error on line 19 of this code. I assume it means I'm incorrectly defining a variable? I know just enuff to be dangerous. thanks for any help:
<?php
//this line includes the database connection variables
include_once("config.php");
$user=$_POST['user'];
$pass=$_POST['pass'];
if ($user && $pass){
$result = mysql_query("SELECT * FROM users ORDER BY user");
$num = mysql_num_rows( $result );
if ($num == 1){
// And now we need to output an XML document
// We use the names of columns as <row> properties.
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<datapacket>';
while($row=mysql_fetch_array($result)){ 0
$line = '<user message="" user="'.$row[user].'" pass="'.$row[pass].'" first="'.$row[first].'" email="'.$row[email].'" last="'.$row[last].'" />';
echo $line;
};
echo '</datapacket>';
} else {
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<invalid message="Sorry, that Login ID and/or Password is not valid"/>'
}
}
?>
this is line 19:
$line = '<user message="" user="'.$row[user].'" pass="'.$row[pass].'" first="'.$row[first].'" email="'.$row[email].'" last="'.$row[last].'" />';