Posts

Showing posts from August, 2015

html - How do I return the result of a database query through a php variable to another page using the include function -

i trying occupy html div of page results of database query page via php echo command. here sample code: page performing query $content = '<h3>member login</h3> <?php //step 3: perform db query $member_info = mysql_query("select * members", $db_connect); ?> <?php // step 4: use returned data while($row = mysql_fetch_array($member_info)){ echo "first name: ".$row[1]; echo "last name: ".$row[2]."<br>"; echo "user name: ".$row[3]."<br>"; echo "password : ".$row[4]."<br>"; echo <hr>; } ?> '; include 'foundation.php'; this page issuing echo command(foundation.php): <div id="content"> <?php echo $content; ?> </div><!--end content div--> the database connection established on page know not issue. believe problem syntax because

javascript - jQuery Scroll not working. (Uncaught ReferenceError: jQuery is not defined ) -

i have installed theme on opencart 1.5.6.4 , reason scroll carousel doesn't work. have included file below. can see errors? or @ website on chrome web inspector. the error on google chrome web inspector says uncaught referenceerror: jquery not defined but not javascript don't know error be. http://ilovefancydress.com/ link js file (function(t) { "use strict"; var = t.jcarousel = {}; i.version = "0.3.0-beta.5"; var s = /^([+\-]=)?(.+)$/; i.parsetarget = function(t) { var = !1, e = "object" != typeof t ? s.exec(t) : null; return e ? (t = parseint(e[2], 10) || 0, e[1] && (i = !0, "-=" === e[1] && (t *= -1))) : "object" != typeof t && (t = parseint(t, 10) || 0), { target: t, relative: } }, i.detectcarousel = function(t) { (var i; t.size() > 0;) { if (i = t.filt

PHP MySQL code optimize -

is there mysql function optimize code? child id getting parent id function get_parents() { $ids = array(); while($id) : $query = "select placement_id referrals user_id = $id"; $query = $this->db->query($query); $result = $query->row(); if(!isset($result->placement_id)) : break; elseif(isset($result->placement_id) && $result->placement_id == 2) : break; endif; $id = $result->placement_id; array_push($ids, $id); if($result) : continue; endif; break; endwhile; return $ids; } the code above return parent id of given user_id, stop if nothing found. found code slow , heavy load. my table relations table | id | user_id | placement_id | | 1 | 2 | null | | 2 | 3 | 2 | | 3 | 4 | 2 | | 4 | 5 | 3 | | 5 | 6 | 4

java - How do I use BaseGameUtils when all of my activities already extend off of another? -

i have hit problem signing in google play in application google play services api. i using basegameutils achievements, , have found use in activity, activity must extend basegameutils, or basegameactivity. here problem is; the activities need use basegameutils extend classes required proper function. here's example: // in play.java, 1 of main activities in use public class play extends gamestate { private boolean debug = true; // want extend basegameutils class, yet need // extend gamestate retain functional operation } how go doing using basegameutils if can't extend it, , how use when, need it, extends class. p.s. have basegameutils , needed set , working. without sign in feature, useless , crashes game. have places few try/catches in code stop debugging purposes. using basegameactivity not @ required . looking @ source basegameactivity , delegates of functionality gamehelper can instantiated , used type of act

ios - Swift: Become First Responder on UITextField Not Working? -

Image
i've created custom uiviewcontroller 1 uitextfield on storyboard. on viewdidload , set uitextfield becomefirstresponder , nothing happened (no keyboards popped up). i tried calling resignfirstresponder() , returned false. next tried find first responder through looping subviews using code on @ get current first responder without using private api . turns out none of sub views first responder. my viewcontroller in storyboard my code class bltestviewcontroller: uiviewcontroller, uitextfielddelegate { @iboutlet var tf: uitextfield override func viewdidload() { super.viewdidload() tf.delegate = self tf.becomefirstresponder() // additional setup after loading view. } } as simple gets...why isn't keyboard coming up!!! 1 thing have on auto layout, i'm not sure if affects keyboard popping up. i tested textfield calling self.tf.becomefirstresponder() indside viewdidload() function , working absolutely fine. y

android - Where to download Google Mobile Ads SDK -

Image
i want add ads application. made account on admob, next step download & integrate google mobile ads sdk eclipse. here download link https://developers.google.com/mobile-ads-sdk/download?hl=en_us#downloadplay with no download button. comic @ all. if change tab ios or wp8 there .zip download. on android tab there isnt any. install them sdk manager. you need dependency (you can add via maven): com.google.android.gms:play-services

mysql - Laravel Eloquent Relationship instead of Join on third table not related to parent -

i have orders table , order_items table related hasmany , belongsto respectively. there products table related order_items hasmany , belongsto respectively. what goal is, create orders object includes products without using join . is possible, how relationships set make happen in eloquent? ideally, have in with cannot figure out how make work. order model: class order extends eloquent { public function orderitems() { return $this->hasmany('orderitem'); } } orderitem model: class orderitem extends eloquent { public function order() { return $this->belongsto('order'); } public function products() { return $this->belongsto('product'); } } product model: class product extends eloquent { public function orderitems() { return $this->hasmany('orderitem'); } } query: $order = order::with('user', 'orderitems', '

sql - mysql 2 table join unknown column -

how can display joined table while selecting specific column of information? select `prop_street`, `prop_price`, `prop_status`, `agt_fname`, `agt_lname`, `prop_status` `property`, `agent` property.prop_agent = agent.agt_fname && property.prop_status = sold; as can see above, trying display rows prop_status = sold error saying error 1054 unknown column sold in clause you need add single quotes sold value. should learn use modern join syntax. don't need backticks around every identifier. and, using table aliases makes query both easier write , read: select prop_street, prop_price, prop_status, agt_fname, agt_lname, prop_status property p join agent on p.prop_agent = a.agt_fname p.prop_status = 'sold'; (i use table aliases from clause, don't know go.) finally, doubt need prop_status twice in select clause.

ruby - rails 4 rspec controllers all failing -

upgrading rails 3.2.17 4.0.1 all rspec's (which passed in 3.2.17 ) fail undefined method , e.g. failure/error: delete :destroy, id: @group nomethoderror: undefined method `delete' #<rspec::examplegroups::groupscontroller::viewaccess::deletedestroy:0x000000041bc188> failure/error: put :update, id: @group, undefined method `put' #<rspec::examplegroups::groupscontroller::viewaccess::putupdate::invalidattributes failure/error: post :create, group: factorygirl.attributes_for(:group) undefined method `post' ... failure/error: :show, id: @group nomethoderror: undefined method `get' #<rspec::examplegroups::groupscontroller::viewaccess::getshow:0x00000004c5f298> and lot of failure/error: session[:user_id] = user.id nameerror: undefined local variable or method `session' #<rspec::examplegroups::groupscontroller::adminaccess::deletedestroy:0x00000004c1ac10> how fix? spec is: require 'spec_helper' describe groupscontro

android - Sending changing Data from View to Fragment -

i have activity , layout contains customview in i'm able draw , got fragment in i'll make statistic used colors, stroke widths , 1 other variable. have send information fragment. how can that? my first idea make lists colors, strokes..., adding every drawing color list made of, getting size of list , @ last sending fragment. or make variable , every time color, stroke width , variable added, specific variable increase, here's same problem don't know how send value fragment. the second problem variable changing, if made 1 small line in red , go statisitc should 1 small red line. if make one, should 2 small red lines, how can receive latest value of these values? you can create interface communicate between view , fragment. read more java interfaces here public class drawview extends view { private oncolorchangedlistener mlistener; // public interface oncolorchangedlistener { public void colorchanged(int color); } publi

html - How to mute an iframe? -

i need mute iframe, don't know how it. here example of have: http://www.codecademy.com/en/bitace74593/codebits/nw7u9b here can hear music website on iframe, need automatically mute audio. hope knows how it. thanks you can mute js, example: put in page: <script type="text/javascript"> myvid=document.getelementbyid("video1"); myvid.muted=true; </script> you should replace "video1" id of iframe, if iframe don't have id add id follow: <iframe width="820" height="390" src="http://nyan.cat" id="iframeid"></iframe>

Wrap Text - Android TextView -

before says should google this, want point out did , tried different methods see work , nothing did me. so, ugly business out of way on questions.... :) i cannot seem text view wrap me. dont know why. here xml code layout. table layout used listview in xml layout. <?xml version="1.0" encoding="utf-8"?> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <tablerow android:layout_width="fill_parent" android:layout_height="wrap_content"> <textview android:id="@+id/ot_color_priority" android:layout_height="fill_parent" android:layout_width="20dp" android:gravity="center_vertical"/> <relativelayout> <textview android:id="@+id/o

c# - Discover devices mono.upnp -

i'm trying communicate new wemo switch on upnp. on windows works fine. i'm trying same on android using mono.upnp lib. looks same cant figuer out how discover devices on mono.upnp. here code on windows: public static list<wemodevice> getdevices () { upnpdevicefinder finder = new upnpdevicefinder (); list<wemodevice> founddevices = new list<wemodevice> (); string devicetype = "upnp:rootdevice"; device devices = finder.findbytype (devicetype, 1); foreach (device device in devices) { if (device.type.startswith ("urn:belkin:")) { switch (getdevicetype (device)) { case wemodevicetype.switch: wemoswitch wemoswitch = new wemoswitch (device); founddevices.add (wemoswitch); break; case wemodevicetype.sensor: wemosensor wemosensor = new wemosensor (devi

Crystal Reports - subtotal for group header -

Image
i need subtotals. what have: a report 3 groups, report shows receipts per month. showing fine relevant details , shows receipts done on dates. report showing this: these fields in receipt# group header , showing need when add subtotal show every receipt, want report subtotal this: i have tried moving these fields receipt date group not work gives me subtotal each date , don't see receipts date. it might small missing stumped. i hope making sense here, if not please let me know , try best clarify. thanks. remove receipt# group , add date group inplace of receipt.. , place receipt# under details group.

adobe - Flash CS6 - 2 Questions? -

question 1 - have flash swf file , want display in browser in full mode meaning should fit browser, have tried adding fscommand("fullscreen", "true"); in first frame of lyaer not work. question 2 - how redirect page @ end of swf movie, have tried adding : stop(); navigatetourl( new urlrequest("*www.microsoft.com*"), "_self"); in last frame not work. thank very assitance !! tonya. for q-1 : <object type="application/x-shockwave-flash" data="your.swf" width="100%" height="100%"> for q-2 : var url:string = "http://www.microsoft.com" var urlrequest:urlrequest = new urlrequest(url); navigatetourl(urlrequest, "_self");

android - Implementing PreferenceFragment? -

i've been struggling implement preferencefragment in app. goal have preferences view replace main_activity fragment container can keep same nav drawer, action bar, etc. i have created preference fragment class so: public class madlibssettings extends preferencefragment { android.support.v7.app.actionbar actionbar; checkboxpreference themeswitch; listpreference fontsize; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = super.oncreateview(inflater, container, savedinstancestate); view.setbackgroundcolor(getresources().getcolor(android.r.color.white)); actionbar = (android.support.v7.app.actionbar) ((mainactivity)getactivity()).getsupportactionbar(); actionbar.settitle("settings"); addpreferencesfromresource(r.layout.madlibs_settings); //fontsize = (listpreference) findpreference("list"); return view; } } and prefs in r.layout.madlibs_settings are:

laravel - How to call several actions from within another action? -

i'm migrating non-mvc application laravel 4.2 , i'm unsure of best way accomplish task. have several reports created on routes this: /reports/this_report /reports/that_report /reports/another_report these actions query database, run bunch of calculations, , generate html tables , forms. what need add page this: /reports/dashboard this dashboard page should display output of 3 reports in condensed format, each "click view details" link takes user main report page. is there way dashboard action call each of report actions, , use output data in dashboard view? here's little code of how this. i'm not sure how have structured, might have adapt little. lets have route dashboard this. route::get('/reports/dashboard', dashboardcontroller@showdashboard'); this route should call controller method processing. class dashboardcontroller extends basecontroller { public function showdashboard() { return view::m

Creating a mapping for an existing index with a new type in elasticsearch -

i found article on elasticsearch's site describing how 'reindex without downtime', that's not acceptable every time new element introduced needs have custom mapping ( http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/ ) does know why can't create mapping existing index new type in elasticsearch? type doesn't exist yet, why not? maybe i'm missing , possible? if so, how can achieved? thanks, vladimir here simple example create 2 type mapping in index, (one after another) i've used i1 index , t1 , t2 types, create index curl -xput "http://localhost:9200/i1" create type 1 curl -xput "http://localhost:9200/i1/t1/_mapping" -d { "t1": { "properties": { "field1": { "type": "string" }, "field2": { "type": "string" } } } }' create type

laravel - Cannot return properly View with prefix and parameter -

i have route looks following: route::group(['prefix' => 'show' ], function() { route::get('{id}', function($id) { return view::make('show')->with('id' , $id); }); }); when enter url etc test.com/show/343242 returns should. want redirect site. when use redirect::to('show/34324'); give me blank screen. when try use return redirect::route('show/34324'); give me route show/34324 don't exist. have no idea how proceed, have search around 1 hour until now. hopefully can bring light this, thanks. should return redirect return redirect::to('show/34324'); to redirect named route route::get('{id}', array('as'=>'route-name',function($id) { return view::make('show')->with('id' , $id); })); // ... return redirect::route('route-name',array(34324));

c# - How do I return Relationship and its properties through neo4jclient with cypher -

please find below cypher query (which normal) match (a:`entity`) - [r] - (b:`entity`) return , r , b first question : how translate neo4jclient in c# code. second question : relation has multiple properties. how access them using neo4jclient ? entity has properties entityname , dataspacename relation has properties relationtype , relationfrequency. the code have used fetching node details, below var query1 = client .cypher .match("(a:`entity`) - [r] - (b:`entity`)") .where("a.dataspace = b.dataspace") .return((a,b) => new { fromentity = return.as<string>("a.entityname"), toentity=return.as<string>("b.entityname") } ); edit : i had tried figure it. following worked. var query1 = client .cypher .match("(a:`entity`) - [r] - (b:`entity`)") .where("a.dataspace = b.dataspace") .return((a

compilation - Compiling .scm files with MIT-SCHEME -

well, i'm trying compile simple scheme code using "better" scheme interpreter/compiler mit-scheme : code.scm : (declare (usual-integrations)) (define (s x) (* x x)) (display (s 2)) what doing? i'm doing this: dxhj ~ mit-scheme dxhj ~ (cf "code.scm") ;generating scode file: "s.scm" => "s.bin"... done ;compiling file: "s.bin" => "s.com"... done ;unspecified return value well, after can't run anything. how can generate .out file? it seems mit-scheme cannot compile native, stand-alone binaries. there other implementations can this. example, chicken scheme, bigloo , gambit.

c# - VS solution folder not generating in the bin/debug or release folder -

Image
i have added solution folder on visual solution project. have added text files inside folder. i have built , rebuilt solution still nothing. the error when trying access file folder: system.io.streamreader file0 = new system.io.streamreader(path.combine(environment.currentdirectory, @"newfolder\sampletext.txt")); an unhandled exception of type 'system.io.directorynotfoundexception' occurred in mscorlib.dll additional information: not find part of path 'i:\programming\projects\sampleproject\sampleproject\sampleproject\bin\release\newfolder\sampletext.txt'. the path release folder valid, newfolder not inside. don't understand why not being generated, great. click on text file, change copy output directory copy if newer or copy always . copy file , folder structure beneath project level , re-create in output folder.

Blackberry java valid directories -

is there way in blackberry java (5.0 , later) getting the valid directories? instance, home directory "file:///store/home/user/", there method gethomedirectory() , return path? if none, hard-coded path can applied version of blackberry java? thanks in advance! you can using system properties : the system class maintains properties object describes configuration of current working environment. system properties include information current user, current version of java runtime, , character used separate components of file path name. system.out.println(system.getproperty("user.home"));

android - why isn't my activity class's instance variable value being preserved onResume()? -

i have listview in activity b populated list of lists through adapter. list of lists retrieved bundle passed activity so: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_results); lvlineups = (listview)findviewbyid(r.id.lvresults); } @override protected void onresume() { super.onresume(); lineups = (arraylist<arraylist<band>>) getintent().getserializableextra("results"); resultsadapter resultsadapter = new resultsadapter(this, lineups); lvlineups.setadapter(resultsadapter); } i launch implicit video intent activity activity b goes in background(paused, onpause invoked) , video goes in front. i click on video, killing activity. activity b's resumes(onresume called) , see list of lists(lineups) empty. according activity lifecyle, activity resuming why don't still see list of lists in step 1, , how preserve after implicit video intent. note: looks vertical li

html - Jquery Place item dynamically -

is there way place element next item. this code . setting button item dynamically this var button_text = "learn now"; $("#ctabtn").text(button_text); $("#ctabtn").css('width', parsefloat(textwidth(button_text) + 30) + "px"); which fine want logo next button adjust position dynamically. if change button text to var button_text = "learn more !!!"; then size of button increases , logo position not moved right. how can move logo dynamically based on button text size? remove left position #image_logo img , set right position instead jquery. this: $("#image_logo img").css("right", $("#ctabtn").width() + 60); instead of 60 can use value better you. now, when dynamically change text in button, logo moves left it. check code on jsfiddle .

html - Semantic UI, positioning labels -

i'm using checkbox in semantic ui. switch position of label , input it's proving kind of pain. using toggle checkbox. <div class="ui toggle checkbox"> <input id="privacy" type="checkbox" checked="checked"> <label for="privacy">public</label> </div> semantic ui checkboxes docs here: http://semantic-ui.com/modules/checkbox.html#/definition if switch input , label in html, toggle function stops working. can't seem position elements relatively... there easy class can add or enable input , label have switched positioning while still maintaining functionality of red-green toggle? thanks.. update: i'm working on fiddle here: includes semantic ui css , js. http://jsfiddle.net/3xkrx/30/ this can do: .ui.toggle.checkbox label { padding-left:0; padding-right:4em; } .ui.checkbox input, .ui.toggle.checkbox label:before { left:auto; right:0; } .ui.toggl

java - Shrink PDF pages with rotation using Rectangle in existing PDF -

Image
i using following code shrink every pages (top , bottom) of existing pdf using itext library. code working fine. if process result pdf , 0 value rotation of every page, while old pdf has other rotation too(i.e. 90deg). i want keep rotation is unable it. code using below shrink pages public void shrinkpdfpages() throws exception { pdfreader reader = new pdfreader("d:/testpdfs/test.pdf"); document doc = new document(); pdfwriter writer = pdfwriter.getinstance(doc, new fileoutputstream( "d://testpdfs/result.pdf")); doc.open(); pdfcontentbyte cb = writer.getdirectcontent(); (int = 1; <= reader.getnumberofpages(); i++) { pdfimportedpage page = writer.getimportedpage(reader, i); float pageheight = reader.getpagesizewithrotation(i).getheight(); float pagewidth = reader.getpagesizewithrotation(i).getwidth(); int rotation = reader.getpagerotatio

javascript - AngularJS Simple Login -

i'm newbie angularjs , have little knowledge of javascript. i'm trying implement login page have url server (http://somerandomip/user/get?p=retail123&username=retail123) give me json response dummy data upon successful login. if username or password invalid, json response returned have error message in it. i've tried looking tutorials in simple way possible can't seem figure out how use $http done. understand pretty n00b question lack of javascript knowledge doesn't help. if direct me towards basic demo of how done, i'd appreciate lot. in advance. edit: understand sending password not safe, i'm trying working login first. firstly need inject dependency use $http - myapp.controller("myctrl", function($scope, $http){ ...... }) then send data via post - var data = { username: username, password: password }; then can post data url - $http.post("/api/login", data).then(function(response){

c# - WCF service failing to carry large array of from DAL to MVC -

i have wcf service returning data of 6500 rows of data list. when trying retrieve data service throwing error - error occurred while receiving http response http://myservice.mydomain.com/services/mytestservice.svc . due service endpoint binding not using http protocol. due http request context being aborted server (possibly due service shutting down). see server logs more details i have tried increase time in configuration still issue persists. in trace getting same below : trace log showing error same below : error occurred while receiving http response http://myservice.mydomain.com/services/mytestservice.svc . due service endpoint binding not using http protocol. due http request context being aborted server (possibly due service shutting down). see server logs more details. stack trace: system.servicemodel.channels.httpchannelutilities.processgetresponsewebexception(webexception webexception, httpwebrequest request, httpabortreason abortreason) system.servicemode

hp uft - Is it possible to test VM/RD application through QTP -

i have installed uft on window7 base machine. want test application running on vm/rd through qtp [vm/rd machine has window7]. possible? i assume "vm" = "virtual machine" , "rd" = "remote desktop"? if so... technically can it, although have horrible experience. if qtp not natively running side-by-side application, lose context-sensitive automation functionality. have keystrokes, x-y coordinate-based mouse operations, , bitmap checks. install qtp in same vm or rd , you'll have better experience.

Maintaining Backstack for Fragment with ChildFragments android -

i have activity calls fragment f1. fragment calls fragment f2 using below code: fragment fragment = new f2fragment(); fragmentmanager fragmentmanager = getfragmentmanager(); fragmenttransaction ft = fragmentmanager.begintransaction(); ft.replace(r.id.frame_container, fragment); ft.addtobackstack("fragment"); ft.commit(); then fragement f2 calls fragment f3 using similar code : fragment fragment = new f3fragment(); fragmentmanager fragmentmanager = getfragmentmanager(); fragmenttransaction ft = fragmentmanager.begintransaction(); ft.replace(r.id.frame_container, fragment); ft.addtobackstack("fragment"); ft.commit(); fragment f3 has 3 child fragments (for 3 tabs) , added using tabhost below: public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // todo auto-generated method stub view rootview = inflater.inflate(r.layout.main_tab, container, false); mtabhos

sql server - SQL returning the last registered result multiple times -

with code last registered result multiple times. want results. function. (i have entries 280x30, 360x40 @ table need 2 numbers variable calculate inch value of these numbers) declare @value1 numeric(18,0) declare @value2 numeric(18,0) select @value2 = substring([values], charindex('x', [values]) + 1, len([values])) , @value1 = substring([values], 1, charindex('x', [values]) - 1), @value1=@value1/(2.54), @value2=@value2/(2.54) tblvalues select @value1 value1, @value2 value2 tblvalues you this: select tbl.value1/2.54 value1, tbl.value2/2.54 value2 ( select substring([values], charindex('x', [values]) + 1, len([values])) value2, substring([values], 1, charindex('x', [values]) - 1) value1 tblvalues ) tbl

python - Django-cities exits with "killed" -

i trying install django-cities on server 500mb ram. whenever run: manage.py cities the system exits saying killed. trying run: manage.py cities --import=country --force worked, guessing matter of running out of memory. to bypass, tried refer package local copy of cities' data file. still didn't work. any ideas on how can migrate data without having increase memory on server? based on suggestion comments, solved setting temporary swap file. if unfamiliar it, can follow these steps: set swap file touch /var/swap.img chmod 600 /var/swap.img set swap file size cd /var dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 this create 1gb swap file. prepare disk image mkswap /var/swap.img activate swap memory swapon /var/swap.img once done, can turn off swap image: swapoff /var/swap.img more information on virtual memory , swap files can found here: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-me

android - What is the the double quotation marks in strings.xml used for? -

just little while ago, looking around on github, , found there double quotation marks beside string value in strings.xml this: <string name="clipmmi" msgid="6952821216480289285">"来电显示"</string> in short mean "来电显示" for full example please click here . i don't know "" used for? because if remove "" beside string value (e.g. "来电显示" change 来电显示), output won't change more, both "来电显示" , 来电显示 print 来电显示 output. so quotations make sense here? it makes sense on languages using simple quotes ' . if simple quotes aren't escaped this, \' , lint detect error. using double quotes @ start , @ end of string value allow omit these backslashes. there may other purposes didn't discovered yet.

javascript - lost data after changing variables in php codeigniter -

i confused.. have ajax code throw value of select options, code: $('#media-select').on('change',function(){ var dt = $(this).val(); alert('media-select='+dt); $.ajax({ type: 'post', data: {media : dt}, url: "<?php echo site_url('admin/uploads/load'); ?>", success: function(data){ $('#result-media-uploader').load(url); } }); }); than output nothing, after checked, wrong on server cause data array.. output print_r(); array( [media] => document) this full code in server.. if(!empty($this->input->post())) { $media = $this->input->post(); $data['bug'] = print_r($media); $data['file'] = $this->db->where('post_type','attachmen