problems with network.request

So in essence the new code should be so:

local json = require ( "json" ) local myNewData local decodedData local function networkListener( event ) if ( event.isError ) then print( "Network error!" ) else myNewData = event.response print ( "From server: " .. myNewData ) decodedData = ( json.decode( myNewData ) ) end end local function searchMovie( title ) title = title or "" tesTab = {} --possible tables local body = "titleMovie="..title.."&tesTab ="..tesTab local params = {} params.headers = headers params.body = body network.request( "http://mySite//getMovie.php", "POST", networkListener, params ) timer.performWithDelay(10, function() --my code end, 1) end searchMovie("Back to the Future")

it’s right?

php and that’s okay?

thanks again and sorry Rob just that I’m a little confused

local json = require ( "json" ) local myNewData local decodedData local function networkListener( event ) if ( event.isError ) then print( "Network error!" ) else myNewData = event.response print ( "From server: " .. myNewData ) decodedData = ( json.decode( myNewData ) ) -- my code that can and should happen now. timer.performWithDelay(10, function() --my code that needs to happen after the listener completes end, 1) end end local function searchMovie( title ) title = title or "" tesTab = {} --possible tables local body = "titleMovie="..title.."&tesTab ="..tesTab local params = {} params.headers = headers params.body = body network.request( "http://mySite//getMovie.php", "POST", networkListener, params ) end searchMovie("Back to the Future")

Ok perfectly, thanks again for your time rob