With the first block, you'd got into a muddle with your opening and closing of quotes.
With quotes, the best idea when you're including array elements is rather than doing
"array key 'hello' = " . $arr['hello']
do
"array key 'hello' = {$arr['hello']}"
Anything in between curly braces is evaluated.
Also, be strict with your formatting - indent everything after
curly braces. With strings, take full advantage of the fact that php allows you to split them over multiple lines and nicely indent all your SQL statements.
It is worth getting a decent development environment: there's a lot out there, I use Dev-php which has a lot of nice features and best of all is completely free
http://devphp.sourceforge.net/. You do have to put up with occasional bizarre german error messages, however.
The problems you've got are all to do with incorrect syntax - go through making sure all your strings close properly, you've got matching brackets/curly brackets (dev php helps with this by highlighting the other bracket), semicolons at the end of lines and $ signs in front of all your variables.
I've done the first one for you, as I said, you'll probably learn better if you go through the second one yourself.
Code:
<html>
<head><title>Tripping Tongues: Edit Your Profile</title></head>
<body>
Edit your profile info.<p>
<?php
if (isset($_POST['submit']) && $_POST['submit'] == "Update")
{
$query_update =
"UPDATE user_info
SET email = '{$_POST['email']}',
city = '{$_POST['city']}',
state = '{$_POST['state']}',
langs = '{$_POST['langs']}'
WHERE username = '{$_SESSION['user_logged']}'
AND password = '(PASSWORD('{$_SESSION['user_password']}'))";
$result_update = mysql_query($query_update) or die (mysql_error());
$query =
"SELECT *
FROM user_info
WHERE username = '{$_SESSION['user_logged']}'
AND password = (PASSWORD('{$_SESSION['user_password']}'))";
$result = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($result);
?>