Jump to content

View source code reveals all the content of my database


idy

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 !
Link to comment
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!
Link to comment
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 !
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.