4 users online. Create an account or sign in to join them.Users

Search

I apologize for my stupid PHP questions, but I figured I might as well ask.

I was hoping to change a variable within an event before it actually gets saved to the DB.

public function load(){
    if(empty($_POST['end-date'])) {
        $_POST['end-date'] = $_POST['start-date'];
    }
    if(isset($_POST['action']['save-pto'])) return $this->__trigger();
}

So basically the idea was that if the "end-date" is not set, it would default to the start date. Is it possible to redefine a POST variable like that? I'm guessing I'm doing something illegal, because it isn't working right now. Thanks,

How about $_POST['fields']['end-date']. For things to go into Symphony they need to be in the $_POST['fields'] array.

I told you it was stupid... Thanks, worked great.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details