No, tira los mismos errores.
Por ejemplo estaba pensando en hacer el codigo en el mismo php del modificarperfil.php.
Código PHP:
Ver original<?php
if ($action == "submit")
{
mysql_query("update prueba set firstname='$firstname',lastname='$lastname' where usuario=$usuario") or
mysql_error(); }
?>
y en el form:
<form method=post action="#">
y el boton <input type="hidden" name="action" value="submit">
pero el tema es que no sé como tendria que declarar la funcion $action