Click here to Skip to main content
15,889,931 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: recommended PHP Framework Pin
Daniel Lieberwirth (BrainInBlack)28-Jun-14 0:03
professionalDaniel Lieberwirth (BrainInBlack)28-Jun-14 0:03 
QuestionPHP & MySQL Pin
Xekria27-May-14 10:14
Xekria27-May-14 10:14 
AnswerRe: PHP & MySQL Pin
Xekria27-May-14 10:17
Xekria27-May-14 10:17 
GeneralRe: PHP & MySQL Pin
Xekria27-May-14 10:20
Xekria27-May-14 10:20 
QuestionRe: PHP & MySQL Pin
Richard MacCutchan27-May-14 21:21
mveRichard MacCutchan27-May-14 21:21 
AnswerRe: PHP & MySQL Pin
mrjay4227-Oct-14 22:34
mrjay4227-Oct-14 22:34 
Questiondynamic navigation menu using PHP Pin
stunt-man26-May-14 21:26
stunt-man26-May-14 21:26 
AnswerRe: dynamic navigation menu using PHP Pin
vivekkamate18-Jul-14 0:51
vivekkamate18-Jul-14 0:51 
Use PHP and angularjs to generate dynamic menu.

1.php service read your data send response in json format.

2.Angular app init with menu item.

your html code like (menu.html)

<pre>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<style>
*{
marginBlush | :O ;
paddingBlush | :O ;
}

body{
font:15px/1.3 'Open Sans', sans-serif;
color: #5e5b64;
text-align:center;
}

a, a:visited {
outline:none;
color:#389dc1;
}

a:hover{
text-decoration:none;
}

section, footer, header, aside, nav{
display: block;
}

/*-------------------------
The menu
--------------------------*/

nav{
display:inline-block;
margin:60px auto 45px;
background-color:#5597b4;
box-shadowBlush | :O 1px 1px #ccc;
border-radius:2px;
}

nav a{
display:inline-block;
padding: 18px 30px;
color:#fff !important;
font-weight:bold;
font-size:16px;
text-decoration:none !important;
line-height:1;
text-transform: uppercase;
background-color:transparent;

-webkit-transition:background-color 0.25s;
-moz-transition:background-color 0.25s;
transition:background-color 0.25s;
}

nav a:first-child{
border-radius:2px 0 0 2px;
}

nav a:last-child{
border-radiusBlush | :O 2px 2px 0;
}

nav.home .home,
nav.projects .projects,
nav.services .services,
nav.contact .contact{
background-color:#e35885;
}

p{
font-size:22px;
font-weight:bold;
color:#7d9098;
}

p b{
color:#ffffff;
display:inline-block;
padding:5px 10px;
background-color:#c4d7e0;
border-radius:2px;
text-transform:uppercase;
font-size:18px;
}
</style>
<!-- Adding the ng-app declaration to initialize AngularJS -->
<script type="text/javascript">
var menuApp = angular.module('menuApp', []);

menuApp.controller('menuCtrl', function ($scope,$http) {
$scope.active = 'Blog';
$scope.description = ''
$scope.menuList = [
{
'name': 'Home',
'description': 'Home page.'
},
{
'name': 'Projects',
'description': 'projects page.'
},
{
'name': 'Services',
'description': 'services page.'
},
{
'name':'Contact',
'description':'contact page.'
}
];
$scope.activeMenu = function(menu){
$scope.active = menu.name;
$scope.description = menu.description;
};
$scope.loadMenu = function() {


$http({
method: 'GET',
url: 'menu.php' //url contain your php service which return data in json format
}).success(function(data) {

$scope.menuList = data;

}).error(function() {

});
}
// $scope.loadMenu();

});

</script>
<div id="main" ng-app="menuApp">
<!-- The navigation menu will get the value of the "active" variable as a class.
The $event.preventDefault() stops the page from jumping when a link is clicked. -->
<div ng-controller="menuCtrl">
<nav class="{{active}}" ng-click="$event.preventDefault()" ng-repeat="menu in menuList">

<!-- When a link in the menu is clicked, we set the active variable -->
<a href="#" class="{{menu.name}}" ng-click="activeMenu(menu)">{{menu.name}}</a>

</nav>

<!-- ng-show will show an element if the value in the quotes is truthful,
while ng-hide does the opposite. Because the active variable is not set
initially, this will cause the first paragraph to be visible. -->

<p ng-hide="active">Please click a menu item</p>
<p ng-show="active">You chose <b>{{active}}</b> </p>
<span ng-show="active"> <b>{{description}}</b></span>
</div>

</div>


</pre>

//your ajax call get response from php service while page load and populate your menu as per your choice.
QuestionCompress a whole folder and all its content on a remote FTP Server with PHP Pin
GoogleBoss25-May-14 23:08
GoogleBoss25-May-14 23:08 
AnswerRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
Kornfeld Eliyahu Peter25-May-14 23:23
professionalKornfeld Eliyahu Peter25-May-14 23:23 
GeneralRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
GoogleBoss26-May-14 23:34
GoogleBoss26-May-14 23:34 
AnswerRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
Kornfeld Eliyahu Peter26-May-14 23:49
professionalKornfeld Eliyahu Peter26-May-14 23:49 
QuestionHow do I create a Joomla module? Pin
Brady Kelly24-May-14 3:44
Brady Kelly24-May-14 3:44 
Questionphp view report with paging Pin
Member 825050516-May-14 4:03
Member 825050516-May-14 4:03 
AnswerRe: php view report with paging Pin
thatraja16-May-14 5:32
professionalthatraja16-May-14 5:32 
QuestionPhoto upload using PHP and HTML5 Pin
Jassim Rahma9-May-14 6:40
Jassim Rahma9-May-14 6:40 
AnswerRe: Photo upload using PHP and HTML5 Pin
Member 108727482-Jul-14 2:38
Member 108727482-Jul-14 2:38 
AnswerRe: Photo upload using PHP and HTML5 Pin
Weekendrockstar1-Sep-14 7:09
Weekendrockstar1-Sep-14 7:09 
QuestionSOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://domain/index.php/api/v2_soap/?wsdl=1’ : failed to load external entity “http://domain/index.php Pin
Member 77023086-May-14 19:53
Member 77023086-May-14 19:53 
AnswerRe: SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://domain/index.php/api/v2_soap/?wsdl=1’ : failed to load external entity “http://domain/index.php Pin
Kornfeld Eliyahu Peter6-May-14 20:35
professionalKornfeld Eliyahu Peter6-May-14 20:35 
GeneralRe: SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://domain/index.php/api/v2_soap/?wsdl=1’ : failed to load external entity “http://domain/index.php Pin
Member 77023086-May-14 20:57
Member 77023086-May-14 20:57 
QuestionAdding value to custom column added in ‘sales_flat_order_item’ table Pin
Member 77023086-May-14 19:53
Member 77023086-May-14 19:53 
Questiondestroy session after sometime Pin
Jassim Rahma4-May-14 10:14
Jassim Rahma4-May-14 10:14 
AnswerRe: destroy session after sometime Pin
Kornfeld Eliyahu Peter4-May-14 10:24
professionalKornfeld Eliyahu Peter4-May-14 10:24 
GeneralRe: destroy session after sometime Pin
Jassim Rahma4-May-14 10:51
Jassim Rahma4-May-14 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.