Jump to content

Archived

This topic is now archived and is closed to further replies.

idy

View source code reveals all the content of my database

Recommended Posts

Hello !

I have put the results of an SQL query into a PHP array. I then pass on this array into a javascript array to manipulate these data in javascript (especially with google maps). But if I click on View source code, anayone can display the full content of this javascript array. How could I hide these data ?

Thanks for your help !

Share this post


Link to post
Share on other sites
There is no way to hide it, unless you use the httprequest object right on your page. It still not hidden, but it will not be written on to the output page!

me!

Share this post


Link to post
Share on other sites
OK so if I understand correctly, you mean I should try to do some Ajax stuff there ?

Is it the case for instance on that site http://www.propsmart.com/homes-for-sale/US/San-Francisco-metro ?

Share this post


Link to post
Share on other sites
Yes, the normal user does not see the data because it's not written to the page, it is written to a variable assignment and held in memory. If advanced user wants to see the data, you can't stop them from writing a script to do it. But for the normal user, that never is the case!

me!

Share this post


Link to post
Share on other sites
Idy,

I just want to say, I love your map feature, haven't seen anything quit like it for real estate. Very user friendly!

Share this post


Link to post
Share on other sites
Just to make sure, the way you suggest me to go round the problem vs. the normal user is to use Ajax if possible ?

jerastraub > I am actually trying to get some inspiration from the website I mentioned... I wish I could do such a job, but alas, this is not my work !

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.