"I think I got screwed."
If any screwing has been done, you did it yourself when you accepted the job for the price you agreed on. You can't expect the client to say "hey, that's too cheap, we'll pay more" 🙂
Pricing is different in each country. What I charge here in dutchland is outragious elsewhere, and peanuts in some places.
It also depends very much on your abilities as a PHP programmer. If you're a 'newbie', then you can't charge 10k for a project, you simply don't have the knowledge to guarantee a good product, and your price should reflect that (you get what you pay for)
NEVER EVER calculate on fixed price basis. things like "If you're going to add security add more like 1K to that" are not smart. Implementing security may be much easier or much more difficult than 1K can pay for.
Give yourself a reasonable hourly rate($20-$50 depending on your ecperience), and guesstimate how long it will take you. This means getting a full spec of what the client wants, and working some things out in advance, to see how long it will take to do the real thing.
Then, offer a fixed price to the client for the given specs. Many 'developers' guess they can do the project in X days, they offer a price for X days, then they find out they can't do it in X days and start demanding more money from the client.
That usually means the client cancels the project and you never get to do any work for them again (nor for their friends and relatives).
Always make some sort of agreement with the client that if the specs change significantly during the development, that's extra. (note: if the client wants a blue background instead of a green one, that NOT extra. You depend on the client, they don't depend on you🙂 )