my app showing empty select field first entry. have read other solution given , tried still not working. my controller code is: .controller('usercreatecontroller', function(user,profile,auth) { alert("hello"); var vm = this; vm.type = 'create'; profile.all() //this service fetch profiles shown in select field .success(function(data){ vm.profile = data; }); vm.userdata.profile = vm.profile[0]; //here have set default value select field and html page is: <label class="col-sm-2 control-label">profile</label> <div class="col-sm-8"> <select ng-model="user.userdata.profile" ng-options="person._id person.profilename person in user.profile"> </select> </div> hierarchy of vm.profile { "_id": 46, "profile": objectid("5516498e95b84548156db754"), "isactive": true, "password": "$2...
hi created php register page site,and page didint work corectly.i dnt have db erorr cant create new user. first time when create new user in db,there new user withuot username , password. <?php if(isset($_post['submit'])){ $con = mysql_connect('fdb13.biz.nf','xxx','yyy'); mysql_select_db('1846946_chat',$con); $uname1= $post['username']; $pword1= $post['password']; $pword2= $post['password2']; if($pword1 != $pword2){ echo "pasvordi se ne poklapaju!<br>"; } else{ $result = mysql_query("select username korisnici username='$uname1'"); if(mysql_num_rows($result)) echo "username vec postoji,izaberi drgaciji<br>"; else{ mysql_query("insert korisnici (username,password) values ('$uname1','$pword1')"); echo "uspesno si se registroavao.klikni <a href='index.php'>ovde</a> da zapocnes chat!<br>"; } } } ?> ...
Comments
Post a Comment