Hi All! i have her a code
<?php
/**
* Main.php
*/
include("include/session.php");
//include("viewproj.php");
?>
<html>
<head>
<title>Export to Excel</title>
</head>
<body>
<form action="searchemp.php" method="post" >
<?php
define ('DB_NAME', 'vincegac_vince');
define ('DB_USER', 'root');
define ('DB_PASSWORD', '');
define ('DB_HOST', 'localhost');
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db(DB_NAME, $link);
if (!$db_selected) {
die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}
$UserName = $session->username;
//$pname = $_POST["projname"];
//$Proj = $session->proj_name;
$strSQL = "SELECT * FROM employee WHERE projmgr = '$UserName' AND projname = '"$_POST["projname"]"' ";
$rs = mysql_query($strSQL);
?>
<table border="1">
<tr>
<th>Employee Name</th><th>Home Address</th><th>Email Address</th><th>Office/project number</th><th>Mobile number</th><th>Home number</th>
<th>Position</th><th>Practice</th>
</tr>
<?php
while($row = mysql_fetch_array($rs)) {
?>
<tr>
<td><?php echo $row['lname'] . ", " . $row['fname'] ?></td><td><?php echo $row['homeadd'] ?></td>
<td><?php echo $row['emailadd'] ?></td><td><?php echo $row['ofcnum'] ?></td><td><?php echo $row['mobilenum'] ?></td>
<td><?php echo $row['homenum'] ?></td><td><?php echo $row['position'] ?></td><td><?php echo $row['practice'] ?></td>
</tr>
<?php
}
?>
</table>
<?php mysql_close(); ?>
<p><a href="main.php"> Home</a> <a href="demo-form.php"> Add Member</a></p>
<input type="submit" name="search" value="Modify record" />
</form>
</body>
</html>
but i have an error. is says
Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\testing\export.php on line 33
its in my sql. Thanks!