Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Changing Page with PHP
  • Hi, I'm having problems changing page after I've inserted information into the database. Here is the code for the controller I've written:
    http://pastebin.com/6WSaS771 Does FuelPHP stop header redirections? I've already executed other code instead of the redirection so I'm sure the script isn't stopping before reaching that part. Thanks
  • Maybe you should spend some time going through the documentation, and perhaps find some example application (like our depot project on github) to see how you should design your controllers. This code screams PHP4 to me... ;) Some tips:
    - use Input::post(), do not use $_POST directly
    - use Response::redirect() instead of header()
    - use validation before saving data (I hope Users is a model, and validation happens there?)
  • Thank you. I did look for some replacement for $_POST at first but couldn't find it. Users is a model and yes, there is validation in there.
    Thanks for all the help, I'll check all that out and update things.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion