Dennis
|
Posted: 09/20/2003, 2:34 PM |
|
ok... so far I have been using ccs objects/prop's & methods to get the job done.
Now, I find myself having to design a product registration page that will take 4 inbound registration parameters and insert a record in the prod_registra table.
Here's my register function:
function RegisterNewProduct($product_id, $machine_id, $activation_code, $order_id)
{
global $DBRegistration;
$insert_result = $DBRegistration->query("INSERT INTO product_registration (order_id, product_id, machine_id, activation_code, reg_date, ip_host, ip_address)
VALUES($order_id, $product_id, $machine_id, $activation_code, CurrentDate(), REMOTE_HOST, REMOTE_ADDR)");
return $insert_result;
}
upon completion it should redirect to a page with a parameter (ie)
registration_done.ccs?Registration_Status=?Reg_status
it's not working... no records are being inserted, and the registration_status parameter is not available in the final page.
Anyone have time to explain a solution (in general)? and show the connection and redirect in detail?
In any case, thanks for reading my problem... we all have time constraints, here it is a weekend, I should be out on my motorcycle!
|
|
|
mkmind
|
Posted: 09/20/2003, 10:56 PM |
|
Hello.
You must define a new db Connection.
function RegisterNewProduct($product_id, $machine_id, $activation_code, $order_id)
{
global $DBRegistration;
$insert_result = New clsDBRegistration(); // Your db Connection Name
$insert_result->query("INSERT INTO product_registration (order_id, product_id, machine_id, activation_code, reg_date, ip_host, ip_address)
VALUES($order_id, $product_id, $machine_id, $activation_code, CurrentDate(), REMOTE_HOST, REMOTE_ADDR)");
return $insert_result;
//Close and destroy the recordset
unset($insert_result);
}
Sorry about my english
by martin from germany
|
|
|
|