Jump to content

Need help Parse error: parse error, expecting `','' or `';''


fehrenbacher33

Recommended Posts

My error is

Parse error: parse error, expecting `','' or `';'' in F:\IST405\Exercises\xampp-win32-1.7.1(3)\xampp\htdocs\IST405\ex07\selectStudent.php on line 46

 

I cant figure it out whats wrong heres my code please help.

 

 

<?php

 

$server = "localhost";  // Server name

$user = "root";        // User name

$pwd = "";              //  Password

/*********************************************

Connect to Database and Failed Message

************************************************/

$connect = mysql_connect ($server, $user, $pwd)

or die ("ERROR: Connection failed!");

/************************************************

 

*************************************************/

$select = mysql_select_db("school");

if(!$select)

exit("Error: Could not select database!");

 

$sql = "SELECT * FROM Student";

$query = mysql_query($sql);

 

if (mysql_num_rows($query) == 0)

{

    echo "No records found";

}

else

{

echo "<table align=center border = 1>";

echo"<tr>";

echo "<td><b>StudentID</td>";

    echo "<td><b>FirstName</td>";

echo "<td><b>LastName</td>";

echo "<td><b>Email</td>";

echo "<td><b>Gender</td>";

echo "<td><b>Password</td>";

echo "<td><b>ConfirmPassword<td>";

    echo "<td><b>StudentYear<b></td>";

echo "<td><b>Interest</td>";

echo "<td><b>Profile</td>";

echo "<td><b>Picture</td>";

echo "<td><b>Sports</td>";

echo"</tr>";

 

while($row = mysql_fetch_object($query))

{

echo"<tr>";

echo "<td>".$row->StudentID"</td>";

    echo "<td>".$row->FirstName"</td>";

echo "<td>".$row->LastName"</td>";

echo "<td>".$row->Email"</td>";

echo "<td>".$row->Gender"</td>";

echo "<td>".$row->Password"</td>";

echo "<td>".$row->ConfirmPassword"<td>";

    echo "<td>".$row->StudentYear"</td>";

echo "<td>".$row->Interest"</td>";

echo "<td>".$row->Profile"</td>";

echo "<td>".$row->Picture"</td>";

echo "<td>".$row->Sports"</td>";

 

 

}

echo"</tr>";

 

}

echo"</table>";

mysql_close($connect);

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.