NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can Javascript call a PHP program and read the results?

Dan Horning dan.horning at planetnoc.com
Wed Jun 1 17:17:02 EDT 2011


On 6/1/2011 5:10 PM, tedd wrote:
> At 4:05 PM -0400 5/31/11, David Roth wrote:
>> Hi Tedd.
>>
>> Thanks for your e-mail.
>>
>> That's returning a graphic and I was looking to get a return of text 
>> so the Javascript could make use of it. Unless I overlooked something 
>> in your example?
>>
>> Best regards,
>>
>> David
I'm sure this doesn't really NEED to be said - but just in case you're 
not aware,
be careful here that you filter requests before you do anything with a 
get/post variable ;-)
especially if you - access a database, a file or any server resource.

so lets say you are feeding the ahah call a number and you want that 
image# $var.jpg
you can do this safely only if you make sure that the var is a number 
and is within the expected range

hope that adds a tiny intro in case somehow someone someplace isn't 
aware of this. :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dan_horning.vcf
Type: text/x-vcard
Size: 277 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110601/e469603e/attachment.vcf>


More information about the talk mailing list