PHP stored within mySQL table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am working on a shopping cart ... specifically writing about the
delivery time lines.  

I thought I would include the information pages (like store policies,
contact us, about us) for my shopping cart within a mysql table.  

But I ran into a challenge when I got to the "Delivery time line
details".  I would like to use PHP to calculate when the expected
arrival date will be.  This means storing the information pages in PHP
code and using the "eval" command.

$one_week = strtotime("+7 days");
$one_week = date('Y-m-d', $one_week);
$two_weeks = strtotime("+14 days");
$two_weeks = date('Y-m-d', $two_weeks);
$six_weeks = strtotime("+42 days");
$six_weeks = date('Y-m-d', $six_weeks);

The specific problem I am not sure how to resolve is with the CSS rules.
I haven't figured out how to resolve the parse error the eval command is
giving me for the following line of code:
echo "<ul class=\"lists\">\r\n";

The rest of what I am write for the delivery looks like this:

===

echo "<h3>Delivery Details</h3>\r\n";

echo "<p>The following are our approximate <b>delivery time
lines</b>:</p>\r\n";

echo "<ul class=\"lists\">\r\n";
echo "<li>To Canada: One Week ($one_week)</li>\r\n";
echo "<li>To United States: Two Weeks ($two_weeks)</li>\r\n";
echo "<li>To Overseas: Up To Six Weeks ($six_weeks)</li>\r\n";
echo "</ul>\r\n";

===

Does anyone have a suggestion for me?  Should I be putting the store
policies into their own files instead of using the database and the eval
command?  How have you approached similar situations?

Ron

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux