using Loaded commerce that has been modified. have a catalog request for where original had one box for address added more boxes city state etc. and added in database. duplicated the code in the PHP file for the boxes
[php]require(‘includes/application_top.php’);
if(isset($_POST[‘submit’]))
{
header(“Content-type: application/x-msdownload”);
header(“Content-Disposition: attachment; filename=extraction.xls”);
header(“Pragma: no-cache”);
header(“Expires: 0”);
$i=0;
echo ‘S.No.’."\t".‘First Name’."\t".‘Last Name’."\t".‘Email Id’."\t".‘Phone’."\t".‘Address’."\t".‘City’."\t".‘State’."\t".‘Zip Code’."\t".‘Truck Make’."\t".‘Date’."\n";
$qry = mysql_query(“SELECT * from catalog_request_users”);
while($res = mysql_fetch_array($qry))
{
$i++;
$fname = $res[‘first_name’];
$lname = $res[‘last_name’];
$email = $res[‘email’];
$phone = $res[‘phone’];
$addr = $res[‘address’];
$city = $res[‘city’];
$state = $res[‘state’];
$zip = $res[‘zipcode’];
$truck = $res[‘truck_make’];
$dat = $res[‘date’];
//$old_date = date(‘y-m-d-h-i-s’);
$new_date = date(‘M,d Y H:i:s’, strtotime($dat));
echo $i ." \t “.$fname.” \t “.$lname.” \t “.$email.” \t “.$phone.” \t “.$addr.”\t “.$city.”\t “.$state.”\t “.$zip.”\t “.$truck.” \t “.$new_date.”\n";
}
exit;
} [/php]
and other php
[php]
require(‘includes/application_top.php’);
$fname = $_REQUEST[‘fname’];
$lname = $_REQUEST[‘lname’];
$email = $_REQUEST[‘email’];
$phone = $_REQUEST[‘phone’];
$address = $_REQUEST[‘add’];
$city = $_REQUEST[‘city’];
$state = $_REQUEST[‘state’];
$zip = $_REQUEST[‘zip’];
$truck = $_REQUEST[‘truck’];
if($email != ‘’)
{
tep_db_query(“insert into catalog_request_users (first_name,last_name,email,phone,address,city,state,zipcode,truck_make,date) values (’$fname’,’$lname’,’$email’,’$phone’,’$address’,’$city’,’$state’,’$zip’,’$truck’,now())”);
if(tep_db_insert_id())
{
echo “
Your request has submited.
”;}
else
{
echo ‘
Your request has failed.
’;}
}
else
{
echo ‘
Your request has failed.
’;}
[/php]
any help with what i am missing would be great.