<?
session_start();
if ($_SESSION[valid] != "yes") {
header ("Location: exit;
}
$db_name = "cayema";
$table_name = "my_contacts";
$connection = @mysql_connect("localhost", "*", "*") or die (mysql_error());
$db = @mysql_select_db($db_name, $connection) or die (mysql_error());
$sql = "SELECT id, f_name, l_name FROM $table_name ORDER BY l_name";
$result = @mysql_query($sql, $connection) or die (mysql_error());
$contact_list = "<ul>";
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$f_name = $row['f_name'];
$l_name = $row['l_name'];
$contact_list .= "<li><a href=\"show_contact.php?id=$id\">$l_name, $f_name</a>";
}
$contact_list .= "</ul>";
?>
Hi all I'm getting several errors and I just need a set of fresh eyes to find them for me. Can you see the problem that generages these two errors?
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/cayema/ on line 2
Parse error: parse error, unexpected T_STRING in /home/cayema/ on line 3
<html>
<head>
<title>My Contact Management Sytem RV: Contacts Listed by name in this case but it could be anything here</title>
</head>
<body>
<h1>My Contact System RV030807</h1>
<p>Select a contact from the list below, to view the contact's record.</p>
<?php echo "$contact_list"; ?>
<p><a href="contact_menu.php">Return to Main Menu Richie V 030807</a></p>
</body>
</html>
session_start();
if ($_SESSION[valid] != "yes") {
header ("Location: exit;
}
$db_name = "cayema";
$table_name = "my_contacts";
$connection = @mysql_connect("localhost", "*", "*") or die (mysql_error());
$db = @mysql_select_db($db_name, $connection) or die (mysql_error());
$sql = "SELECT id, f_name, l_name FROM $table_name ORDER BY l_name";
$result = @mysql_query($sql, $connection) or die (mysql_error());
$contact_list = "<ul>";
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$f_name = $row['f_name'];
$l_name = $row['l_name'];
$contact_list .= "<li><a href=\"show_contact.php?id=$id\">$l_name, $f_name</a>";
}
$contact_list .= "</ul>";
?>
Hi all I'm getting several errors and I just need a set of fresh eyes to find them for me. Can you see the problem that generages these two errors?
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/cayema/ on line 2
Parse error: parse error, unexpected T_STRING in /home/cayema/ on line 3
<html>
<head>
<title>My Contact Management Sytem RV: Contacts Listed by name in this case but it could be anything here</title>
</head>
<body>
<h1>My Contact System RV030807</h1>
<p>Select a contact from the list below, to view the contact's record.</p>
<?php echo "$contact_list"; ?>
<p><a href="contact_menu.php">Return to Main Menu Richie V 030807</a></p>
</body>
</html>