In this paper, we present an adaptive beamforming scheme for smart antenna arrays in the presence of several desired and interfering signals, and additive white Gaussian noise. As compared with standard schemes, the proposed algorithm minimizes the noise and interference contributions, but enforces magnitude-only constraints, and exploits the array-factor phases in the desired-signal directions as further optimization parameters. The arising nonlinearly-constrained optimization problem is recast, via the Lagrange method, in the unconstrained optimization of a non-quadratic cost function, for which an iterative technique is proposed. The implementation via artificial neural networks is addressed, and results are compared with those obtained via standard schemes.