Jump to content


Photo

View source code reveals all the content of my database


  • Please log in to reply
5 replies to this topic

#1 idy

idy
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 29 September 2006 - 09:31 PM

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 !

#2 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 29 September 2006 - 09:35 PM

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!

#3 idy

idy
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 29 September 2006 - 09:55 PM

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...Francisco-metro ?

#4 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 29 September 2006 - 10:02 PM

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!

#5 jerastraub

jerastraub
  • Members
  • PipPipPip
  • Advanced Member
  • 77 posts

Posted 29 September 2006 - 10:04 PM

Idy,

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

#6 idy

idy
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 29 September 2006 - 10:11 PM

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 !




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users