
530 So.2d 495 (1988)
R.F. THOMPSON, Appellant,
v.
P.W. MARTIN, Appellee.
No. 88-725.
District Court of Appeal of Florida, Second District.
September 2, 1988.
*496 R.F. Thompson, pro se.
Kurt J. Bomar of Martin and Bomar, Chartered, Sarasota, for appellee.
SCHOONOVER, Acting Chief Judge.
The appellant, R.F. Thompson, challenges an order dismissing his second amended complaint with prejudice. We find that the appellant stated a cause of action for legal malpractice and, accordingly, reverse.
The appellant filed an action for legal malpractice against the appellee, P.W. Martin. The appellant's second amended complaint alleged in substance that the appellee, at the appellant's request, formally appeared as counsel of record in certain pending legal actions on behalf of the appellant but negligently allowed those actions to be dismissed for failure to prosecute. It was further alleged that the dismissals resulted in the appellant's claims being forever barred by the statute of limitations, and that as a direct and proximate result of the appellee's negligence, the appellant was damaged to the extent of the damages which could have been obtained in the dismissed lawsuits.
The appellee subsequently moved to dismiss the second amended complaint. The trial court granted the motion based upon its finding that the appellant failed to state a cause of action, and it entered an order dismissing the action with prejudice. This timely appeal followed.
Although the appellant's complaint was not a model pleading, we find that it adequately stated a cause of action and was, therefore, improperly dismissed. In order to state a cause of action, a complaint need only contain a short and plain statement as to the ultimate facts which indicate that the pleader is entitled to relief. Fla.R.Civ.P. 1.110(b). Furthermore, in determining whether a complaint states a cause of action, this court must assume that all of the facts alleged in the complaint are true and must draw all reasonable inferences in favor of the pleader. Bolton v. Smythe, 432 So.2d 129 (Fla. 5th DCA), review denied, 440 So.2d 353 (Fla. 1983).
A cause of action for legal malpractice has three elements: (1) the attorney's employment and (2) his neglect of a reasonable duty, which (3) is the proximate cause of loss to the client. Hatcher v. Roberts, 478 So.2d 1083 (Fla. 1st DCA 1985), review denied, 488 So.2d 68 (Fla. 1986); Weiner v. Moreno, 271 So.2d 217 (Fla. 3d DCA 1973). Considering the allegations of the second amended complaint in a light most favorable to the appellant and drawing all reasonable inferences therefrom, we find that the required elements of a legal malpractice action were alleged. See, e.g., Dykema v. Godfrey, 467 So.2d 824 (Fla. 1st DCA 1985). Thus, the trial court erred in dismissing the second amended complaint for failure to state a cause of action.
We also note that, in addition to contending that the second amended complaint did not state a cause of action, the appellee's motion to dismiss advanced several additional arguments as to why the appellant's action should be dismissed. A motion to dismiss is not a substitute for a motion for summary judgment, Dunnell v. Malone and Hyde, Inc., 425 So.2d 646 (Fla. 3d DCA 1983), and in ruling on a motion to dismiss a complaint for failure to state a cause of action, we are confined to a consideration of the allegations found within the four corners of the complaint. Bricker v. Kay, 446 So.2d 1151 (Fla. 3d DCA 1984). A complaint need only state facts sufficient to indicate that a cause of action exists and need not anticipate affirmative defenses. Hammonds v. Buckeye Cellulose Corp., 285 So.2d 7 (Fla. 1973). Thus, we have not considered any possible defenses to this action that may exist.
*497 We, accordingly, reverse the trial court's order dismissing the second amended complaint and remand the cause for further proceedings consistent herewith.
REVERSED AND REMANDED.
FRANK and THREADGILL, JJ., concur.
