  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: reviews.php 213 2005-10-05 10:37:33Z hpdl $ |
| |
| 3 | + | $Id: reviews.php 215 2005-10-05 19:29:55Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
171 | 171 | | |
| |
172 | 172 | | return $Qreviews; |
| |
173 | 173 | | } |
  |
| 174 | + | |
| |
| 175 | + | function saveEntry($data) { |
| |
| 176 | + | global $osC_Database; |
| |
| 177 | + | |
| |
| 178 | + | $Qreview = $osC_Database->query('insert into :table_reviews (products_id, customers_id, customers_name, reviews_rating, languages_id, reviews_text, reviews_status, date_added) values (:products_id, :customers_id, :customers_name, :reviews_rating, :languages_id, :reviews_text, :reviews_status, now())'); |
| |
| 179 | + | $Qreview->bindTable(':table_reviews', TABLE_REVIEWS); |
| |
| 180 | + | $Qreview->bindInt(':products_id', $data['products_id']); |
| |
| 181 | + | $Qreview->bindInt(':customers_id', $data['customer_id']); |
| |
| 182 | + | $Qreview->bindValue(':customers_name', $data['customer_name']); |
| |
| 183 | + | $Qreview->bindValue(':reviews_rating', $data['rating']); |
| |
| 184 | + | $Qreview->bindInt(':languages_id', $_SESSION['languages_id']); |
| |
| 185 | + | $Qreview->bindValue(':reviews_text', $data['review']); |
| |
| 186 | + | $Qreview->bindInt(':reviews_status', $data['status']); |
| |
| 187 | + | $Qreview->execute(); |
| |
| 188 | + | } |
  |
174 | 189 | | } |
| |
175 | 190 | | ?> |