cannot add data to tables!! please help!
-
I cannot get data added to my plugin tables from a form. I’ve tried just about everything. I am able to submit the data but nothing happens and I get no errors or anything. The values are the same as the form input type
names.
Here’s the code:
<?php
global $wpdb;if(isset($_POST[‘submit’])){
if ($wpdb->query(“INSERT INTO
".$wpdb->prefix."release_table
(artist_name
,title
,release_date
,label_id
,format
,buy_url
, ‘info’ ) VALUES ( ‘”.artist_name.”‘, ‘”.title.”‘, ‘”.release_date.”‘, ‘”.label_id.”‘, ‘”.format.”‘, ‘”.buy_url.”‘, ‘”.format.”‘ );”)) {
echo “<p align=’center’>”.TXT_WPSC_COUPONHASBEENADDED.”</p>”;
include_once(‘wp-config.php’);
include_once(‘wp-includes/wp-db.php’);}
}?>
- The topic ‘cannot add data to tables!! please help!’ is closed to new replies.