I have the following code, and I need to make the following words/code to be translated into the code provided in the bottom. THANKS GUYS.

If you press submit UPDATE authorize SET LockStatus ='LOCKED' WHERE ='$_SESSION['user_name'])'. Else - Select LockStatus from authorize is = to LOCKED show <input type="submit" value="Edit" disabled="disabled" /> Else If - Select LockStatus from authorize is not equal to LOCKED, then show <input type="submit" value="submit" name="submit">

PHP Code:
$db_user "lefteh"
$db_pwd "1234"
$db_name "MyDB"
<title>My first MySQL form submission</title> 
if (!isset($_POST['submit'])) { 
<form action="" method="post"> 
Name: <input type="text" name="name"><br> 
Favorite Color: <input type="text" name="color"><br> 
<input type="submit" name="submit" value="Submit!"> 
} else { 
$name $_POST['name']; 
$color $_POST['color']; 
mysql_query("INSERT INTO `colors` (name, favoriteColor) VALUES ('$name', '$color')"); 
"Success! Your favourite colour has been added!"