Jump to content
Manol

$p->save not working

Recommended Posts

I've this piece of code

$p = wire('pages')->get(1024);
echo $p->resp;    // OK
$p->resp = "33";  // not working
$p->of(false);
$p->save();

I can read the output of $p->resp, but when I try to save a new value $p->resp="33" is not working, any ideas.

 

Thanks.

Share this post


Link to post
Share on other sites

Try to turn off output formatting before changing the value. 

  • Like 5

Share this post


Link to post
Share on other sites
$p->of(false);	// should go first
$p->resp = "33";  // expected to work
$p->save();
  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...