hello
for security reasons
i can back up files ... or even if they got deleted they are worth nothing ... but in database there is a shopping cart that i am trying to get ride of its smarty engine
so what i am going to do is to create templates and by the sku select the template details
so if in array i dont have to worry .... include the file ... after the shopping cart script get the product SKU from data base , i use that to select all array for that sku
sku123 example
cart system >>> selected all the data for sku123 .... now smarty should show them
no
i will use my way
for sku123 , price is from database , but this product got images and wide table for inside the description for example
the template i select i will call it onecolumn
so if not default then
$header['sku123']='htmlHeaderheaderheader';
for product sku321 , this got special discount , a div with the discount price init will be displayed
$discountbox['sku321'] = " div or whatever and $discount "
see how complex ... now how i have the array to equal what this echo produce
echo '<div style=\"color : #ff0000\"><p align=\"center\">price after discount :' . "$discountprice";
if i create a variable call it $discountsku123, it is much easier i think ...
i am new so i have ideas and dont know what to do withit ... and trying to do some and i know there are other better ways
buti really afraid someone will hack the database and then take contact or other infos that considered sensitive but not encrypted
thank you alot for trying to help me
Servyces;10892157 wrote:Is there a reason why you do not want to use a database? For this purpose, it's the best solution. You could do it with writing to files, but a database is more efficient.
As for the header and footer, you should include them from 2 single files, if you ever want to change them, you just need to edit the file with the code and not all the pages from your site seperately.