Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用JQuery、主干和PHP将购物车数据插入MySQL数据库_Php_Jquery_Mysql_Backbone.js - Fatal编程技术网

如何使用JQuery、主干和PHP将购物车数据插入MySQL数据库

如何使用JQuery、主干和PHP将购物车数据插入MySQL数据库,php,jquery,mysql,backbone.js,Php,Jquery,Mysql,Backbone.js,我在这里找到了代码,但它没有提供插入数据库的功能 下面是示例 index.html <script type="text/template" id="submit-btn-tmpl"> <button data-icon="arrow-d" data-theme="b" id="submit-btn">Submit</button> </script> 这不是一个jQuery移动问题。考虑一下这个问题。“SpRealAtCooDead我

我在这里找到了代码,但它没有提供插入数据库的功能

下面是示例
index.html

<script type="text/template" id="submit-btn-tmpl">
    <button data-icon="arrow-d" data-theme="b" id="submit-btn">Submit</button>
</script>

这不是一个jQuery移动问题。考虑一下这个问题。“SpRealAtCooDead我可能不是什么语言?它也使用JSON…标签必须读取jQuery、ReBoo.js、php、mysql:-)@ PrimoAtCooDeD非常感谢T.T.但是你知道如何解决我的问题吗?
// Submit Button
var SubmitButton = Backbone.View.extend({
    el: '.basket-footer',

    //get template
    template:  $('#submit-btn-tmpl').template(),

    appRouter: null,

    initialize: function() {
        // set appRouter
        this.appRouter = this.options.appRouter;
    },

    render : function () {

        var totalPrice = 0

        // get total price
        if (this.appRouter.basketItems.length > 0)
            totalPrice = this.appRouter.basketItems.totalPrice();

        // clean up
        $('#submit-btn').remove();

        // and finally render this view with total price
        $(this.el).append($.tmpl(this.template, {price:totalPrice}));
    }
});