I am having problems with the following enums. The cust_type works fine,
but the cust_reseller does not post back in the save. I have attached the
pages source code also.
echo "<td bgcolor=\"ccccdd\"width=180><b>cust_type</b></td>
<td bgcolor=\"#ddddee\">";
# print all the items listed in the enum
enum_select(customer, cust_type, $cust_type);
echo "</td><tr>\n";
echo "<td bgcolor=\"ccccdd\"width=180><b>cust_reseller</b></td>
<td bgcolor=\"#ddddee\">";
# print all the items listed in the enum
enum_select(customer, reseller, $cust_reseller);
echo "</td><tr>\n";
Thanks,
Jeff Sloyer
<?php
// Copyright (C) 2002 Paul Yasi <[EMAIL PROTECTED]>, read the README file for
more information
/*----------------------------------------------------------------------------*/
// Check for authorized accesss
/*----------------------------------------------------------------------------*/
if(constant("INDEX_CITRUS") <> 1){
echo "You must be logged in to run this. Goodbye.";
exit;
}
if (!defined("INDEX_CITRUS")) {
echo "You must be logged in to run this. Goodbye.";
exit;
}
if (!isset($base->input['save'])) { $base->input['save'] = ""; }
if ($base->input['save']) {
// save customer information
// GET Variables
$signup_date = $base->input['signup_date'];
$name = $base->input['name'];
$company = $base->input['company'];
//$street = $base->input['street'];
//$city = $base->input['city'];
//$state = $base->input['state'];
$country = $base->input['country'];
//$zip = $base->input['zip'];
//$phone = $base->input['phone'];
//$alt_phone = $base->input['alt_phone'];
//$fax = $base->input['fax'];
//$source = $base->input['source'];
$contact_email = $base->input['contact_email'];
$cust_notes = $base->input['cust_notes'];
$cust_type = $base->input['cust_type'];
$cust_homepage = $base->input['cust_homepage'];
$cust_reseller = $base->input['cust_reseller'];
///$secret_answer = $base->input['secret_answer'];
//$tax_exempt_id = $base->input['tax_exempt_id'];
//$account_manager_password = $base->input['account_manager_password'];
//$cancel_date = $base->input['cancel_date'];
$default_billing_id = $base->input['default_billing_id'];
$account_number= $_SESSION['account_number'];
// build update query
if ($cancel_date <> "") {
echo"if query";
$query = "UPDATE customer
SET signup_date = '$signup_date',
name = '$name',
company = '$company',
country = '$country',
cust_notes = '$cust_notes',
contact_email = '$contact_email',
default_billing_id = '$default_billing_id',
cust_type = '$cust_type',
cust_homepage = '$cust_homepage',
cust_reseller = '$cust_reseller',
WHERE account_number = '$account_number'";
} else {
echo"else query<br>";
echo"$account_number<br>";
echo"cust_reseller=$cust_reseller<br>";
echo"default_billing_id:$default_billing_id";
$query = "UPDATE `customer` SET
`notes`='$cust_notes',
`reseller`='$cust_reseller',
`signup_date`='$signup_date',
`name`='$name',
`company`='$company',
`country`='$country',
`contact_email`='$contact_email',
`cust_type`='$cust_type',
`homepage`='$cust_homepage'
WHERE (`account_number` LIKE
'$account_number')";
}
$result = $DB->Execute($query) or die ("$l_queryfailed");
print "<h3>$l_changessaved<h3>";
/*print "<script language=\"JavaScript\">window.location.href =
\"index.php?load=customer&type=module\";</script>";*/
}
else
{
$query = "SELECT * FROM customer WHERE account_number =
$account_number";
$DB->SetFetchMode(ADODB_FETCH_ASSOC);
$result = $DB->Execute($query) or die ("$l_queryfailed");
$myresult = $result->fields;
// Put values into variablies and Print HTML results
$signup_date = $myresult['signup_date'];
$name = $myresult['name'];
$company = $myresult['company'];
//$street = $myresult['street'];
//$city = $myresult['city'];
//$state = $myresult['state'];
//$zip = $myresult['zip'];
$country = $myresult['country'];
//$phone = $myresult['phone'];
//$alt_phone = $myresult['alt_phone'];
// $fax = $myresult['fax'];
// $source = $myresult['source'];
$contact_email = $myresult['contact_email'];
//$secret_question = $myresult['secret_question'];
//$secret_answer = $myresult['secret_answer'];
//$tax_exempt_id = $myresult['tax_exempt_id'];
$default_billing_id = $myresult['default_billing_id'];
$cust_type = $myresult['cust_type'];
$cust_homepage = $myresult['homepage'];
$cust_reseller = $myresult['reseller'];
$cust_notes = $myresult['notes'];
echo "
<a href=\"index.php?load=customer&type=module\">[ $l_undochanges ]</a>
<table cellpadding=0 border=0 cellspacing=0 width=720>
<td valign=top width=360>
<form action=\"index.php\">
<table cellpadding=5 cellspacing=1 border=0 width=360>
<td bgcolor=\"#ccccdd\" width=180><b>Creation Date</b></td><td
width=180 bgcolor=\"#ddddee\">$signup_date</td><tr>
<td bgcolor=\"#ccccdd\"><b>$l_name</b></td><td
bgcolor=\"#ddddee\"><input name=\"name\" type=text value=\"$name\"></td><tr>
<td bgcolor=\"#ccccdd\"><b>$l_company</b></td><td
bgcolor=\"#ddddee\"><input name=\"company\" type=text
value=\"$company\"></td><tr>
<td bgcolor=\"#ccccdd\"><b>Country</b></td><td
bgcolor=\"#ddddee\"><input name=\"country\" type=text
value=\"$country\"></td><tr>
<td bgcolor=\"#ccccdd\"><b>Contact Email</b></td><td
bgcolor=\"#ddddee\"><input name=\"contact_email\" type=text
value=\"$contact_email\"></td><tr>
</table>
</td>
<td valign=top width=360>
<table cellpadding=5 cellspacing=1 width=360>
<td bgcolor=\"#ccccdd\"><b>$l_defaultbillingid</b></td><td
bgcolor=\"#ddddee\"><input type=hidden name=default_billing_id
value=\"$default_billing_id\">$default_billing_id</td><tr>";
echo "<td bgcolor=\"ccccdd\"width=180><b>cust_type</b></td>
<td bgcolor=\"#ddddee\">";
# print all the items listed in the enum
enum_select(customer, cust_type, $cust_type);
echo "</td><tr>\n";
echo "<td bgcolor=\"ccccdd\"width=180><b>cust_reseller</b></td>
<td bgcolor=\"#ddddee\">";
# print all the items listed in the enum
enum_select(customer, reseller, $cust_reseller);
echo "</td><tr>\n";
echo"
<td bgcolor=\"#ccccdd\"><b>Homepage</b></td><td
bgcolor=\"#ddddee\"><input name=\"cust_homepage\" type=text
value=\"$cust_homepage\"></td><tr>";
//<td bgcolor=\"#ccccdd\"><b>Reseller</b></td><td
bgcolor=\"#ddddee\"><input name=\"cust_reseller\" type=text
value=\"$cust_reseller\"></td><tr>
echo"<td bgcolor=\"#ccccdd\"><b>Notes</b></td><td
bgcolor=\"#ddddee\"><input name=\"cust_notes\" type=text
value=\"$cust_notes\"></td><tr>
</table>
</td>
<tr>
<td colspan=2>
<center>
<input name=save type=submit class=smallbutton value=\"$l_savechanges\">
<input type=hidden name=load value=customer>
<input type=hidden name=type value=module>
<input type=hidden name=edit value=on>
</center>
</td>
</table>
</form>
"; //end
}
?>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Citrusdb-users mailing list
Citrusdb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/citrusdb-users