Allowing a template connect to the database?
-
My friend created a template that one of our page will be based off of. It’s a data submission form. Not sure what happened but now all of a sudden everytime I try to submit data into the database through the form, I get no errors but the information I submit does not show up within the database so it’s not going through.
What sql query do I need to use for a template to connect to a database table and insert information into it?
This is what my query looks like right now:
<?php /** * Template Name: Admin Data Entry Sheet **/ get_header(); global $wpdb; $myprefix = $wpdb->prefix."MMOCraze_"; if(current_user_can('manage_options')){ ?>
Any ideas?
The database table I am trying to submit info into is called mmocraze.wp_MMOCraze_games
The code is supposed to allow only an administrator to access the page (the page is set to private).
- The topic ‘Allowing a template connect to the database?’ is closed to new replies.