processing.js login
in
Processing with Other Languages
•
10 months ago
Hello everybody,
I'm developing a web application for which the user has to log in. Since I don't like php I've done everything with processing. I wrote a processing sketch and implemented it as follows:
...
<script src="/processing-1.4.1.js"></script>
...
<canvas data-processing-sources="website.pde"></canvas>
...
Everything is working but I have one serious problem. For the login I need to send data to a database. To connect with it I have to add user name and user password to my sketch. I read that everyone can view my source code and so is able to read out the database access information. And with this it's possible to read user information like user names and passwords. First question: Is it really possible to view the source code?
Alternatively I could send the data from my sketch to a php file, but I don't know how to do this. Opening a link to the php file and get the information with GET from the URL is one possibility, but how to open the link? I don't want to open the link in a new and blank browser tab, this would be stupid (I guess). Can I open a link without really opening it in a new browser tab? And would this be safe?
I'm very thankful for any help.
Kind regards
1