751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

I am working in the wordpress admin area. Everything is working and I am not getting any errors but when I press the save button on my form, the database does not get updated. How do you figure out why this is when you don’t get any error messages?

2587 posts Put a Donk On It
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has sold $250,000+ on Envato Market
+10 more
ThemeProvince says

I am working in the wordpress admin area. Everything is working and I am not getting any errors but when I press the save button on my form, the database does not get updated. How do you figure out why this is when you don’t get any error messages?

Open wp-config.php

Change WPDEBUG to true.

751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

Thank you for that thePhoenix. That did show me what the problem was. but I have no idea what this error means.

Undefined index: update_slider_options

that is the name of my save button in a meta_box for a custom post type. Defined like so


<?php if ( $_POST['update_slider_options'] == 'true' ) { slider_options_update(); } ?>
<input name="update_slider_options" value="true" type="hidden" />
<input name="update_slider_options" class="button" value="Update Options" type="submit" />

do you have any idea?

2587 posts Put a Donk On It
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has sold $250,000+ on Envato Market
+10 more
ThemeProvince says

Some errors generated make no sense so I just disabled that feature. But I thought it might solve your thread’s issues.

373 posts plop
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been part of the Envato Community for over 5 years
  • Made it to the Authors' Hall of Fame
+8 more
kimonothemes says

Firebug + FirePHP

1148 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace says

Thank you for that thePhoenix. That did show me what the problem was. but I have no idea what this error means.

Undefined index: update_slider_options

That means that “update_slider_options” was not found in the $_POST array

Check these two things:

Is the form method POST ?

Also, you have two inputs with that name, the hidden one and the submit button.

Try print_r($_POST) to see the full array

751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

I tried the print_r and all I got was Array(). I did check the code and both are there. now I am getting no errors, it still just isn’t updating the database

would you give my code a once over? it’s 127 lines

http://pastebin.com/GDp04xac

58 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+5 more
DigitalCavalry says

You need experience, experience and experience and var_dump function. :)

751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

I am afraid I don’t understand your post. What are your trying to say?

1148 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace says

I added this:

slider_options_meta_box();

Right before the

add_action('admin_init', 'manager_init');

And I changed

function slider_options_meta_box($post) {

To

function slider_options_meta_box() {

And everything works for me

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by