Hey evryone. For some reason, I can't seem to insert anything into this table that I have in a database It connects just fine and the variables that I'm retrieving are just fine, which leads me to believe that my INSERT statement is incorrect. Any ideas? Here's the code:
function createrma2() {
require("deps.php");
require("common.php");
$from = pv($_REQUEST['from']);
$custname = pv($_REQUEST['custname']);
$custstreet = pv($_REQUEST['custstreet']);
$custcity = pv($_REQUEST['custcity']);
$custcity = pv($_REQUEST['custstate']);
$custzip = pv($_REQUEST['custzip']);
$custnum = pv($_REQUEST['custnum']);
$coname = pv($_REQUEST['coname']);
$cocontact = pv($_REQUEST['cocontact']);
$conum = pv($_REQUEST['conum']);
$costreet = pv($_REQUEST['costreet']);
$cocity = pv($_REQUEST['cocity']);
$costate = pv($_REQUEST['costate']);
$cozip = pv($_REQUEST['cozip']);
$coweb = pv($_REQUEST['coweb']);
$part = pv($_REQUEST['part']);
$partdes = pv($_REQUEST['partdes']);
$rmanum = pv($_REQUEST['rmanum']);
$comments = pv($_REQUEST['comments']);
$status = pv($_REQUEST['status']);
require_once("validate.php");
if (function_exists('date_default_timezone_set')) {
date_default_timezone_set("$pcrt_timezone");
}
$s1t = date('Y-m-d H:i:s');
$s1u = $_COOKIE["username"];
$rs_connect = @mysql_connect($dbhost, $dbuname, $dbpass) or die("Couldn't connect the db");
$rs_select_db = @mysql_select_db($dbname, $rs_connect) or die("Couldn't select the db");
$rs_insert_scan = "INSERT INTO rma (from, custname, custstreet, custcity, custstate, custzip, custnum, coname, cocontact, conum, costreet, cocity, costate, cozip, coweb, part, partdes, rmanum, comments, status, s1u, s1t) VALUES (\'$from\',\'$custname\',\'$custstreet\',\'$custcity\',\'$custstate\',\'$custzip\',\'$custnum\',\'$coname\',\'$cocontact\',\'$conum\',\'$costreet\',\'$cocity\',\'$costate\',\'$cozip\',\'$coweb\',\'$part\',\'$partdes\',\'$rmanum\',\'$comments\',\'$status\',\'$s1u\',\'$s1t\')";
@mysql_query($rs_insert_scan, $rs_connect);
echo "$from <br> $custname <br> $custstreet <br> $custcity <br> $custstate <br> $custzip <br> $custnum <br> $coname <br> $cocontact <br> $conum <br> $costreet <br> $cocity <br> $costate <br> $cozip <br> $coweb <br> $part <br> $partdes <br> $rmanum <br> $comments <br> $status <br> $s1u <br> $s1t";
}
The echo statement comes out correctly with everything correct and the connection to the database is not erroring out. All help is appreciated. Thanks :)