{"id":27975,"date":"2018-01-20T20:55:01","date_gmt":"2018-01-20T17:55:01","guid":{"rendered":"http:\/\/kamil-abzalov.com\/tutorials\/create-php-mvc-application-cabinet-main-page\/"},"modified":"2020-04-11T00:14:13","modified_gmt":"2020-04-10T21:14:13","slug":"create-php-mvc-application-cabinet-main-page","status":"publish","type":"post","link":"https:\/\/kamil-abzalov.com\/en\/tutorials\/phpmysql\/create-php-mvc-application-cabinet-main-page\/","title":{"rendered":"Create php MVC application. Cabinet main page"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_fullwidth_header title=&#8221;Create php MVC application. Cabinet main page&#8221; _builder_version=&#8221;3.16&#8243; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;off&#8221; button_two_letter_spacing__hover_enabled=&#8221;off&#8221; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_fullwidth_header][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;3.25&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; custom_padding=&#8221;0px|||&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_dcsbcm_divi_breadcrumbs_module homebreadcrumbtext=&#8221;Home&#8221; hide_currentbreadcrumb=&#8221;off&#8221; _builder_version=&#8221;4.4.2&#8243; custom_padding=&#8221;0px|||&#8221; hover_enabled=&#8221;0&#8243; fontsbreadcrumbs_font_size_tablet=&#8221;51&#8243; fontsbreadcrumbs_line_height_tablet=&#8221;2&#8243; fontsseperator_font_size_tablet=&#8221;51&#8243; fontsseperator_line_height_tablet=&#8221;2&#8243; fontsbreadcrumblinks_font_size_tablet=&#8221;51&#8243; fontsbreadcrumblinks_line_height_tablet=&#8221;2&#8243;][\/et_pb_dcsbcm_divi_breadcrumbs_module][et_pb_text _builder_version=&#8221;3.27.4&#8243; border_color_all=&#8221;#ffffff&#8221; use_border_color=&#8221;off&#8221;]Today our task is cabinet main page making. This page requires large html coding. That&#8217;s why I will use ready-to-use html template because I want to draw your attention to the more important tasks for you. You can download template by <a href=\"https:\/\/startbootstrap.com\/template-overviews\/sb-admin-2\/\" rel=\"noopener noreferrer\" target=\"_blank\">this link<\/a>.<br \/>\n[\/et_pb_text][et_pb_video src=&#8221;https:\/\/www.youtube.com\/watch?v=7CjOcqfqfZ8&#8243; _builder_version=&#8221;3.0.94&#8243;][\/et_pb_video][et_pb_text _builder_version=&#8221;3.27.4&#8243; border_color_all=&#8221;#ffffff&#8221; use_border_color=&#8221;off&#8221;]After page template creating we need to create CabinetController and CabinetModel. In controller as always we define private property &#8211; template for rendering and create default method (index), which will render the page with some dynamic data. This data is stored in $pageData array. First of all we will print some basic common statistics &#8211; count of orders, products and users. For this purpose we write appropriate methods &#8211; getOrdersCount(), getOrdersProductsCount() and getUsersCount(). PHP code of these methods is identical except for table names from which we get the data. Methods return count of rows not specific data. That&#8217;s why in sql query we must use COUNT(*) SQL function. And we will get result with fetchColumn() method.<br \/>\n[\/et_pb_text][et_pb_dmb_code_snippet title=&#8221;Code lesson (CabinetController.php)&#8221; code=&#8221;PD9waHAKCmNsYXNzIENhYmluZXRDb250cm9sbGVyIGV4dGVuZHMgQ29udHJvbGxlciB7CgogICAgcHJpdmF0ZSAkcGFnZVRwbCA9ICIvdmlld3MvY2FiaW5ldC50cGwucGhwIjsKCiAgICBwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoKSB7CiAgICAgICAgJHRoaXMtPm1vZGVsID0gbmV3IENhYmluZXRNb2RlbCgpOwogICAgICAgICR0aGlzLT52aWV3ID0gbmV3IFZpZXcoKTsKICAgIH0KCiAgICBwdWJsaWMgZnVuY3Rpb24gaW5kZXgoKSB7CiAgICAgICAgJHRoaXMtPnBhZ2VEYXRhWyd0aXRsZSddID0gItCa0LDQsdC40L3QtdGCIjsKCiAgICAgICAgJG9yZGVyc0NvdW50ID0gJHRoaXMtPm1vZGVsLT5nZXRPcmRlcnNDb3VudCgpOwogICAgICAgICR0aGlzLT5wYWdlRGF0YVsnb3JkZXJzQ291bnQnXSA9ICRvcmRlcnNDb3VudDsKCiAgICAgICAgJHByb2R1Y3RzQ291bnQgPSAkdGhpcy0+bW9kZWwtPmdldFByb2R1Y3RzQ291bnQoKTsKICAgICAgICAkdGhpcy0+cGFnZURhdGFbJ3Byb2R1Y3RzQ291bnQnXSA9ICRwcm9kdWN0c0NvdW50OwoKICAgICAgICAkdXNlcnNDb3VudCA9ICR0aGlzLT5tb2RlbC0+Z2V0VXNlcnNDb3VudCgpOwogICAgICAgICR0aGlzLT5wYWdlRGF0YVsndXNlcnNDb3VudCddID0gJHVzZXJzQ291bnQ7CgogICAgICAgICR0aGlzLT52aWV3LT5yZW5kZXIoJHRoaXMtPnBhZ2VUcGwsICR0aGlzLT5wYWdlRGF0YSk7CiAgICB9Cgp9CgogPz4K&#8221; admin_label=&#8221;\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430&#8221; style=&#8221;docco&#8221; linenums=&#8221;on&#8221; usetabwidth=&#8221;on&#8221; tabwidth=&#8221;4&#8243; _builder_version=&#8221;3.0.94&#8243; hover_enabled=&#8221;0&#8243;]PD9waHAKCmNsYXNzIENhYmluZXRDb250cm9sbGVyIGV4dGVuZHMgQ29udHJvbGxlciB7CgogICAgcHJpdmF0ZSAkcGFnZVRwbCA9ICIvdmlld3MvY2FiaW5ldC50cGwucGhwIjsKCiAgICBwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoKSB7CiAgICAgICAgJHRoaXMtPm1vZGVsID0gbmV3IENhYmluZXRNb2RlbCgpOwogICAgICAgICR0aGlzLT52aWV3ID0gbmV3IFZpZXcoKTsKICAgIH0KCiAgICBwdWJsaWMgZnVuY3Rpb24gaW5kZXgoKSB7CiAgICAgICAgJHRoaXMtPnBhZ2VEYXRhWyd0aXRsZSddID0gItCa0LDQsdC40L3QtdGCIjsKCiAgICAgICAgJG9yZGVyc0NvdW50ID0gJHRoaXMtPm1vZGVsLT5nZXRPcmRlcnNDb3VudCgpOwogICAgICAgICR0aGlzLT5wYWdlRGF0YVsnb3JkZXJzQ291bnQnXSA9ICRvcmRlcnNDb3VudDsKCiAgICAgICAgJHByb2R1Y3RzQ291bnQgPSAkdGhpcy0+bW9kZWwtPmdldFByb2R1Y3RzQ291bnQoKTsKICAgICAgICAkdGhpcy0+cGFnZURhdGFbJ3Byb2R1Y3RzQ291bnQnXSA9ICRwcm9kdWN0c0NvdW50OwoKICAgICAgICAkdXNlcnNDb3VudCA9ICR0aGlzLT5tb2RlbC0+Z2V0VXNlcnNDb3VudCgpOwogICAgICAgICR0aGlzLT5wYWdlRGF0YVsndXNlcnNDb3VudCddID0gJHVzZXJzQ291bnQ7CgogICAgICAgICR0aGlzLT52aWV3LT5yZW5kZXIoJHRoaXMtPnBhZ2VUcGwsICR0aGlzLT5wYWdlRGF0YSk7CiAgICB9Cgp9CgogPz4K[\/et_pb_dmb_code_snippet][et_pb_dmb_code_snippet title=&#8221;Code lesson (CabinetModel.php)&#8221; code=&#8221;PD9waHAKCmNsYXNzIENhYmluZXRNb2RlbCBleHRlbmRzIE1vZGVsIHsKCiAgICBwdWJsaWMgZnVuY3Rpb24gZ2V0T3JkZXJzQ291bnQoKSB7CiAgICAgICAgJHNxbCA9ICJTRUxFQ1QgQ09VTlQoKikgRlJPTSBvcmRlcnMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBnZXRQcm9kdWN0c0NvdW50KCkgewogICAgICAgICRzcWwgPSAiU0VMRUNUIENPVU5UKCopIEZST00gcHJvZHVjdHMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBnZXRVc2Vyc0NvdW50KCkgewogICAgICAgICRzcWwgPSAiU0VMRUNUIENPVU5UKCopIEZST00gdXNlcnMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKCn0KCiA\/Pgo=&#8221; admin_label=&#8221;\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430&#8221; style=&#8221;docco&#8221; linenums=&#8221;on&#8221; usetabwidth=&#8221;on&#8221; tabwidth=&#8221;4&#8243; _builder_version=&#8221;3.0.94&#8243; hover_enabled=&#8221;0&#8243;]PD9waHAKCmNsYXNzIENhYmluZXRNb2RlbCBleHRlbmRzIE1vZGVsIHsKCiAgICBwdWJsaWMgZnVuY3Rpb24gZ2V0T3JkZXJzQ291bnQoKSB7CiAgICAgICAgJHNxbCA9ICJTRUxFQ1QgQ09VTlQoKikgRlJPTSBvcmRlcnMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBnZXRQcm9kdWN0c0NvdW50KCkgewogICAgICAgICRzcWwgPSAiU0VMRUNUIENPVU5UKCopIEZST00gcHJvZHVjdHMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBnZXRVc2Vyc0NvdW50KCkgewogICAgICAgICRzcWwgPSAiU0VMRUNUIENPVU5UKCopIEZST00gdXNlcnMiOwogICAgICAgICRzdG10ID0gJHRoaXMtPmRiLT5wcmVwYXJlKCRzcWwpOwogICAgICAgICRzdG10LT5leGVjdXRlKCk7CiAgICAgICAgJHJlcyA9ICRzdG10LT5mZXRjaENvbHVtbigpOwogICAgICAgIHJldHVybiAkcmVzOwogICAgfQoKCn0KCiA\/Pgo=[\/et_pb_dmb_code_snippet][et_pb_comments _builder_version=&#8221;4.4.2&#8243; custom_margin=&#8221;30px||||false|false&#8221; hover_enabled=&#8221;0&#8243;][\/et_pb_comments][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today our task is cabinet main page making. This page requires large html coding. That&#8217;s why I will use ready-to-use html template because I want to draw your attention to the more important tasks for you. You can download template by this link. After page template creating we need to create CabinetController and CabinetModel. In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"[et_pb_section bb_built=\"1\" fullwidth=\"on\" specialty=\"off\"][et_pb_fullwidth_header title=\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 php MVC \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430\" background_color=\"#7c4dff\" text_orientation=\"left\" header_fullscreen=\"off\" header_scroll_down=\"off\" image_orientation=\"center\" background_layout=\"dark\" content_orientation=\"center\" custom_button_two=\"off\" button_two_icon_placement=\"right\" custom_button_one=\"off\" button_one_icon_placement=\"right\" _builder_version=\"3.0.94\" \/][\/et_pb_section][et_pb_section bb_built=\"1\" admin_label=\"section\"][et_pb_row admin_label=\"row\" background_position=\"top_left\" background_repeat=\"repeat\" background_size=\"initial\" _builder_version=\"3.0.92\" custom_padding=\"0px|||\"][et_pb_column type=\"4_4\"][et_pb_dcsbcm_divi_breadcrumbs_module _builder_version=\"3.0.92\" hide_homebreadcrumb=\"off\" homebreadcrumbtext=\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f\" separator=\"sep-raquo\" hide_currentbreadcrumb=\"off\" homebreadcrumborientation=\"left\" background_layout=\"light\" fontsbreadcrumbs_font_size_tablet=\"51\" fontsbreadcrumbs_line_height_tablet=\"2\" fontsseperator_font_size_tablet=\"51\" fontsseperator_line_height_tablet=\"2\" fontsbreadcrumblinks_font_size_tablet=\"51\" fontsbreadcrumblinks_line_height_tablet=\"2\" custom_padding=\"0px|||\" \/][et_pb_text background_layout=\"light\" use_border_color=\"off\" border_color=\"#ffffff\" border_style=\"solid\" _builder_version=\"3.0.89\" border_color_all=\"#ffffff\" border_style_all=\"solid\"]\r\n\r\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0443\u0440\u043e\u043a\u0430\u0445 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u041e\u041e\u041f \u0432 PHP. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435, \u044f \u0441\u0447\u0438\u0442\u0430\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 php \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u041e\u041e\u041f. \u041f\u0440\u0438\u0447\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 - MVC (Model-View-Controller).<\/p>\r\n\r\n[\/et_pb_text][et_pb_video _builder_version=\"3.0.89\" src=\"https:\/\/www.youtube.com\/watch?v=0cFU08rluAg\" \/][et_pb_text background_layout=\"light\" use_border_color=\"off\" border_color=\"#ffffff\" border_style=\"solid\" _builder_version=\"3.0.89\" border_color_all=\"#ffffff\"]\r\n\r\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u043c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u0437\u043e\u0432. \u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u0438\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430).<br \/>\r\n\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f MVC \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u0440\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 - \u041c\u043e\u0434\u0435\u043b\u044c, \u0412\u0438\u0434 \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443:<\/p>\r\n<ul>\r\n<li>\u041c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\r\n<li>\u0412\u0438\u0434 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435<\/li>\r\n<li>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (actions) \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0432\u043e\u044e \u043c\u043e\u0434\u0435\u043b\u044c (\u0438\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438)<\/li>\r\n<\/ul>\r\n<p>MVC \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 PHP \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432.<\/p>\r\n\r\n[\/et_pb_text][et_pb_dmb_code_snippet admin_label=\"\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430\" title=\"\u041f\u043b\u0430\u043d \u0440\u0430\u0431\u043e\u0442\" style=\"docco\" linenums=\"on\" usetabwidth=\"on\" tabwidth=\"4\" use_border_color=\"off\" border_color=\"#ffffff\" border_style=\"solid\" _builder_version=\"3.0.89\"]0JzQvtC00YPQu9GMICLQm9C40YfQvdGL0Lkg0LrQsNCx0LjQvdC10YIiCgoxLiDQktGF0L7QtCDQsiDQu9C40YfQvdGL0Lkg0LrQsNCx0LjQvdC10YIgKNGB0L4g0YHQvNC10L3QvtC5INCw0LLQsNGC0LDRgNC60LgpCjIuINCT0LvQsNCy0L3QsNGPINGB0YLRgNCw0L3QuNGG0LAg0LvQuNGH0L3QvtCz0L4g0LrQsNCx0LjQvdC10YLQsAozLiDQodGC0YDQsNC90LjRhtCwINGD0L\/RgNCw0LLQu9C10L3QuNGPINC\/0L7Qu9GM0LfQvtCy0LDRgtC10LvRj9C80LggKNGD0L\/RgNCw0LLQu9C10L3QuNC1INC70LjRh9C90YvQvNC4INC00LDQvdC90YvQvNC4KQo0LiDQodC\/0LjRgdC+0Log0LfQsNC60LDQt9C+0LIgKNC\/0L7QutGD0L\/QvtC6KQoKICAgIC0g0JjRgdC\/0L7Qu9GM0LfRg9C10LzRi9C5INGB0YLQtdC6INGC0LXRhdC90L7Qu9C+0LPQuNC5CiAgICAgICAgLSBwaHAKICAgICAgICAtIG15c3FsCiAgICAgICAgLSBodG1sK2NzcwogICAgICAgIC0gYm9vdHN0cmFwCiAgICAgICAgLSBqcXVlcnkKICAgICAgICAtIGFuZ3VsYXIKCtCf0L7QtNGF0L7QtCDQuiDRgNCw0LfRgNCw0LHQvtGC0LrQtQotIE1WQyAoTW9kZWwtVmlldy1Db250cm9sbGVyKQoK0KHRgtGA0YPQutGC0YPRgNCwINCR0JQ6Ci0g0KLQsNCx0LvQuNGG0LAgItCf0L7Qu9GM0LfQstCw0YLQtdC70LgiICAgICAgICAKLSDQotCw0LHQu9C40YbQsCAi0KDQvtC70LgiICAgICAgICAKLSDQotCw0LHQu9C40YbQsCAi0JfQsNC60LDQt9GLIiAgICAgICAgCi0g0KLQsNCx0LvQuNGG0LAgItCi0L7QstCw0YDRiyIgICAgICAgIAotINCi0LDQsdC70LjRhtCwICLQl9Cw0LrQsNC30YvQotC+0LLQsNGA0Ysi[\/et_pb_dmb_code_snippet][\/et_pb_column][\/et_pb_row][\/et_pb_section]","_et_gb_content_width":"","footnotes":""},"categories":[274,219],"tags":[],"class_list":["post-27975","post","type-post","status-publish","format-standard","hentry","category-phpmysql","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create php MVC application. Cabinet main page - Kamil Abzalov&#039;s blog<\/title>\n<meta name=\"description\" content=\"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create php MVC application. Cabinet main page\" \/>\n<meta property=\"og:description\" content=\"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kamabzalov\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-20T17:55:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-10T21:14:13+00:00\" \/>\n<meta name=\"author\" content=\"Kamil&#039; Abzalov\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Create php MVC application. Cabinet main page\" \/>\n<meta name=\"twitter:description\" content=\"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function\" \/>\n<meta name=\"twitter:creator\" content=\"@kamabzalov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kamil&#039; Abzalov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/\"},\"author\":{\"name\":\"Kamil' Abzalov\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"headline\":\"Create php MVC application. Cabinet main page\",\"datePublished\":\"2018-01-20T17:55:01+00:00\",\"dateModified\":\"2020-04-10T21:14:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/\"},\"wordCount\":849,\"commentCount\":0,\"articleSection\":[\"PHP+MySQL\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/\",\"name\":\"Create php MVC application. Cabinet main page - Kamil Abzalov's blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\"},\"datePublished\":\"2018-01-20T17:55:01+00:00\",\"dateModified\":\"2020-04-10T21:14:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"description\":\"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/phpmysql\\\/create-php-mvc-app-cabinet-main-page\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create php MVC application. Cabinet main page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"name\":\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kamil-abzalov.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\",\"name\":\"Kamil' Abzalov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"caption\":\"Kamil' Abzalov\"},\"sameAs\":[\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/kamabzalov\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kamabzalov\",\"https:\\\/\\\/x.com\\\/kamabzalov\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/kamabzalov\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create php MVC application. Cabinet main page - Kamil Abzalov's blog","description":"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/","og_locale":"en_US","og_type":"article","og_title":"Create php MVC application. Cabinet main page","og_description":"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function","og_url":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/","og_site_name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","article_author":"https:\/\/www.facebook.com\/kamabzalov","article_published_time":"2018-01-20T17:55:01+00:00","article_modified_time":"2020-04-10T21:14:13+00:00","author":"Kamil' Abzalov","twitter_card":"summary_large_image","twitter_title":"Create php MVC application. Cabinet main page","twitter_description":"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function","twitter_creator":"@kamabzalov","twitter_misc":{"Written by":"Kamil' Abzalov","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/#article","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/"},"author":{"name":"Kamil' Abzalov","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"headline":"Create php MVC application. Cabinet main page","datePublished":"2018-01-20T17:55:01+00:00","dateModified":"2020-04-10T21:14:13+00:00","mainEntityOfPage":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/"},"wordCount":849,"commentCount":0,"articleSection":["PHP+MySQL","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/","url":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/","name":"Create php MVC application. Cabinet main page - Kamil Abzalov's blog","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/#website"},"datePublished":"2018-01-20T17:55:01+00:00","dateModified":"2020-04-10T21:14:13+00:00","author":{"@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"description":"In this lesson we will create cabinet main page and print some common data with using SQL COUNT() function","breadcrumb":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kamil-abzalov.com\/videouroki\/phpmysql\/create-php-mvc-app-cabinet-main-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/kamil-abzalov.com\/en\/"},{"@type":"ListItem","position":2,"name":"Create php MVC application. Cabinet main page"}]},{"@type":"WebSite","@id":"https:\/\/kamil-abzalov.com\/#website","url":"https:\/\/kamil-abzalov.com\/","name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kamil-abzalov.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600","name":"Kamil' Abzalov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","caption":"Kamil' Abzalov"},"sameAs":["https:\/\/kamil-abzalov.com\/","https:\/\/www.facebook.com\/kamabzalov","https:\/\/www.linkedin.com\/in\/kamabzalov","https:\/\/x.com\/kamabzalov","https:\/\/www.youtube.com\/user\/kamabzalov"]}]}},"_links":{"self":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/comments?post=27975"}],"version-history":[{"count":8,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27975\/revisions"}],"predecessor-version":[{"id":31975,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27975\/revisions\/31975"}],"wp:attachment":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/media?parent=27975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/categories?post=27975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/tags?post=27975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}