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?

2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 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?

2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 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.

421 posts plop
  • Had an item that became a weekly top seller
  • 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 6 years
+9 more
kimonothemes
says

Firebug + FirePHP

1149 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
+6 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?

1149 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

by
by
by
by
by
by