Home > Backend Development > PHP Tutorial > When ecshop submits an order, it prompts 'There are no items in your shopping cart' - Solution_PHP Tutorial

When ecshop submits an order, it prompts 'There are no items in your shopping cart' - Solution_PHP Tutorial

WBOY
Release: 2016-07-20 11:13:29
Original
1370 people have browsed it




<span <span  1</span> <span /*</span><span *
</span><span  2</span> <span      * 检查cookie
</span><span  3</span> <span      *
</span><span  4</span> <span      * @access  public
</span><span  5</span> <span      * @param
</span><span  6</span> <span      *
</span><span  7</span> <span      * @return void
</span><span  8</span>      <span */</span>
<span  9</span>     <span function</span><span  check_cookie ()
</span><span 10</span> <span     {
</span><span 11</span>         <span if</span> ( <span isset</span>(<span $_COOKIE</span>['ECS'])  && <span isset</span>(<span $_COOKIE</span>['ECS']['user_id'])  && <span isset</span>(<span $_COOKIE</span>['ECS']['password'<span ]))
</span><span 12</span> <span         {
</span><span 13</span>       <span $ecs_user_id</span>   = <span $_COOKIE</span>['ECS']['user_id'<span ];
</span><span 14</span>    <span $ecs_user_pass</span> = <span $_COOKIE</span>['ECS']['password'<span ];
</span><span 15</span>             <span $sql</span> = "SELECT " . <span $this</span>->field_name ." AS user_name".
<span 16</span>                    " FROM " . <span $this</span>->table(<span $this</span>->user_table) .
<span 17</span>                    " WHERE ".<span $this</span>->field_id." = '<span $ecs_user_id</span>' AND ".<span $this</span>->field_pass." = '<span $ecs_user_pass</span>'"<span ;
</span><span 18</span>             <span $username</span> = <span $this</span>->db->getOne(<span $sql</span><span );
</span><span 19</span>             <span if</span> (<span $username</span> && (<span $this</span>->charset != 'UTF8'<span ))
</span><span 20</span> <span             {
</span><span 21</span>                 <span $username</span> = ecs_iconv(<span $this</span>->charset, 'UTF8', <span $username</span><span );
</span><span 22</span> <span             }
</span><span 23</span>             <span return</span> <span $username</span><span ;
</span><span 24</span> <span         }
</span><span 25</span>         <span else</span>
<span 26</span> <span         {
</span><span 27</span>             <span return</span> ''<span ;
</span><span 28</span> <span         }
</span><span 29</span>     }</span>
Copy after login

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440371.htmlTechArticle( ( ['ECS']) ( ['ECS']['user_id']) ( ['ECS']['password' = ['ECS']['user_id' = ['ECS']['password' = "SELECT " . -field_name ." AS user_name". " FROM " . -table( -user_table) . " WHE...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template