WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
// Insert Customer E-Mail Address in the Order Form// Author: ChochkoBG// Version: 1.0// Get existing values from database $sql = "SELECT email FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."'"; $rowset = $database->query($sql); if($database->is_error()) $error[] = $database->get_error(); $row = $rowset->fetchRow();// insert values into form $tpl->set_var('$cust_email', $row['email']); if (!isset($cust_email) || $cust_email == '') { $cust_email = $row['email'];} if (!isset($cust_confirm_email) || $cust_confirm_email == '') { $cust_confirm_email = $row['email'];}
Code: [Select]// Insert Customer E-Mail Address in the Order Form// Author: ChochkoBG// Version: 1.0// Get existing values from database $sql = "SELECT email FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."'"; $rowset = $database->query($sql); if($database->is_error()) $error[] = $database->get_error(); $row = $rowset->fetchRow();// insert values into form $tpl->set_var('$cust_email', $row['email']); if (!isset($cust_email) || $cust_email == '') { $cust_email = $row['email'];} if (!isset($cust_confirm_email) || $cust_confirm_email == '') { $cust_confirm_email = $row['email'];}
<?php// insert values into form $tpl->set_var('$cust_email', $wb->get_email()); if (!isset($cust_email) || $cust_email == '') { $cust_email = $wb->get_email(); } if (!isset($cust_confirm_email) || $cust_confirm_email == '') { $cust_confirm_email = $wb->get_email(); }