• Resolved s0what

    (@s0what)


    I have variable $authcode.

    'echo $authcode'
    returns
    'f15fd75f726171c03736'
    and
    'print_r($authcode)'
    returns

    SimpleXMLElement Object
    (
        [0] =>f15fd75f726171c03736
    )

    but

    update_option('widget_draugiemlv_authcode', $authcode);
    		$authcode = get_option('widget_draugiemlv_authcode');
    		print_r($authcode);
    		echo "<br />kods:". $authcode;

    returns

    SimpleXMLElement Object
    (
    )
    kods:

    Why db keeps some text instead of f15fd75f726171c03736 ?

Viewing 1 replies (of 1 total)
  • Thread Starter s0what

    (@s0what)

    here is a solution – add (string) before $authcode like this:

    update_option('widget_draugiemlv_authcode', (string)$authcode);
    		$authcode = get_option('widget_draugiemlv_authcode');
    		print_r($authcode);
    		echo "<br />kods:". $authcode;

Viewing 1 replies (of 1 total)
  • The topic ‘problem adding option to db’ is closed to new replies.