Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' on line --->
echo "$client['client_fname']";
Seems ok to me...help pls!
<?php
session_start();
?>
<html>
<head>
<title>My Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
/* Establish connection to the server and the database */
include("connect.php");
?>
<?php
/* SQL queries to collect information from the database */
$client_profile = mysql_query("SELECT * FROM client_info WHERE client_id = '$client'");
$client = mysql_fetch_array($client_profile);
?>
<?php
/* Shows default view when the button is yet to be clicked */
echo "$client['client_fname']";
echo "$client['client_lname']";
echo "$client['client_email']";
echo "$client['client_address']";
echo "$client['client_city']";
echo "$client['client_state']";
echo "$client['client_zip']";
echo "$client['client_country']";
echo "$client['client_phone1']";
echo "$client['client_phone2']";
echo "<a href = '$PHP_SELF?op=ds'>Update My Profile!</a>";
/* Shows the update form when the button is clicked */
if ($op = "ds") {
?>
<form method = 'POST' action = '<?= $_SERVER['PHP_SELF'] ?>'>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90"><div align="right">First Name:</div></td>
<td width="310" colspan="2"> <input name="fname" type="text" id="fname" value=""></td>
</tr>
<tr>
<td><div align="right">Last Name:</div></td>
<td colspan="2"><input name="lname" type="text" id="lname"></td>
</tr>
<tr>
<td><div align="right">Email:</div></td>
<td colspan="2"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td><div align="right">Address:</div></td>
<td colspan="2"><input name="address" type="text" id="address"></td>
</tr>
<tr>
<td><div align="right">City:</div></td>
<td colspan="2"><input name="city" type="text" id="city"></td>
</tr>
<tr>
<td><div align="right">State:</div></td>
<td colspan="2"><input name="state" type="text" id="state"></td>
</tr>
<tr>
<td><div align="right">Zip:</div></td>
<td colspan="2"><input name="zip" type="text" id="zip"></td>
</tr>
<tr>
<td><div align="right">Country:</div></td>
<td colspan="2"><input name="country" type="text" id="country"></td>
</tr>
<tr>
<td><div align="right">Phone:</div></td>
<td colspan="2"><input name="phone" type="text" id="phone"></td>
</tr>
<tr>
<td><div align="right">Fax:</div></td>
<td><input name="fax" type="text" id="fax"></td>
<td><input name="update" type="submit" id="update" value="update!"></td>
</tr>
</table>
</form>
<?php
if ($update == "update!") {
/* SQL queries to update the submitted information to the database */
$sql = mysql_query("UPDATE INTO account_details
SET client_fname = '$fname',
client_lname = '$lname',
client_email = '$email',
client_address = '$address',
client_city = '$city',
client_state = '$state',
client_zip = '$zip',
client_country = '$country',
client_phone1 = '$phone',
client_phone2 = '$fax'
WHERE client_id = '$client'");
if (@$sql) {
echo "Your information has been updated.";
} else {
echo "There was a submission error.<a href = 'profile.php'>Please try again.</a>";
}
?>
</body>
</html>