It is considered extremely bad practice to use mysql. You should upgrade the mysql -> mysqli... this will help you prevent SQL Injection, and solve some of your problems. As mysql will soon by deprecated with newer PHP updates.
Here is an example of how to do this:
$query = "UPDATE $table
SET
email=?,
aim=?,
icq=?,
yahoo=?,
homepage=?,
picfile=?,
ip=?,
email2=?,
password=?,
title=?,
download=?,
approved=?,
allowdelete=?,
author=?,
facebook=?,
piclink=?,
domain=?,
option3=?,
secret=?
WHERE id=?";
if($stmt = $mysqli->prepare($query)){
$stmt->bind_param('sssssssssssssssssssi', $email, $aim, $icq, $yahoo, $homepage, $picfile, $myip, $email2, $password, $title, $download, $approved, $allowdelete, $author, $facebook, $pic link, $domain, $option3, $secret, $id);
$stmt->execute();
}else die("Failed to prepare stmt");