inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 27, 2010 17:51:47 GMT -8
If a mod feels this thread would fit better in Code Requests, feel free to move the thread. I posted in the Programming board because this isn't the usual HTML/JavaScript request you'd find in the other board.Hi! I have a free 000webhost.com account and I haven't done anything with MySQL, databases, PHP, or similar things. In fact, I don't really know what I'd be using in this request, so hopefully someone could help me out! On my ProBoards forum, I'd like to give my members an area where they can include a biography in their profile. However, due to character limits and everything, this wouldn't be possible with just JavaScript. I'd create a little HTML form on the members' profile where they can type/paste a text-only (exclude < brackets > to prevent any injection/abuse) biography about themselves for other members to view. What they submit in the form would be sent to the off-site database, and then on the next profile page view of that member, the biography would appear. What I'm looking for is some help with creating the code to send the bio to the database, and another code to extract the bio of the member when viewing his/her profile. If this means anything, I can have 2 MySQL databases, and PHP is available with my 000webhost account. Thanks so much in advance for any help!
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Dec 29, 2010 12:42:03 GMT -8
I could help you with this! Sounds like something I already do. We can chat some time.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 29, 2010 13:24:27 GMT -8
Thanks. How should I start this? The HTML form is easy, so I could whip that up quickly, but I don't know how I'd have the data submitted sent to the database. Is this a good place to start?
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Dec 29, 2010 13:31:06 GMT -8
Yes, it is. I'll PM you information that i need.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 29, 2010 14:00:50 GMT -8
Yes, it is. I'll PM you information that i need. Thanks Just PMd you the username and password for the ghv3.comyr.com account at 000webhost.
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Dec 29, 2010 14:28:43 GMT -8
Thank you, I'll get working on this.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 29, 2010 14:31:51 GMT -8
Thanks very much
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Dec 29, 2010 15:19:13 GMT -8
My pleasure
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 30, 2010 18:07:43 GMT -8
Let me know if there's anything I can do to help out
|
|
inherit
39608
0
Nov 26, 2011 18:53:00 GMT -8
iDunk
Previously Computerpros
2,533
April 2005
computerpros
|
Post by iDunk on Dec 30, 2010 20:51:31 GMT -8
I'd like to point out that until there is an API (at least authentication) from ProBoards, add-ons like this that require passing data to another server are going to be fairly simple to compromise. Where these are member bios I suppose it isn't as big of a deal, but just keep in mind.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Dec 31, 2010 11:33:40 GMT -8
Thanks for the info iDunk. I thought about possible javascript injections and things like that, but I don't think that will be much of a problem at my forum. There are probably a few members that could figure out things like that, but member biographies would be kept backed up in a thread on the forum as well. As far as malicious code being saved in a biography form, that's why I was hoping anything within <brackets> would be removed so there's no HTML or script that would be parsed. There are probably ways around this security measure, but hopefully nothing bad ever happens.
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jan 1, 2011 11:38:06 GMT -8
To prevent code injection, just use PHP's htmlentities() when displaying the data.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jan 4, 2011 14:36:49 GMT -8
Thanks Charles. Any update on this, Imma C. Hristmas-Tree?
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jan 4, 2011 20:52:03 GMT -8
I have a custom function that escapes strings, so no need to do htmlentities(). And, I have practice tomorrow, and a project to finish, so I don't know when I'll get back to this. Sorry!
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jan 4, 2011 23:13:04 GMT -8
I have a custom function that escapes strings, so no need to do htmlentities(). And, I have practice tomorrow, and a project to finish, so I don't know when I'll get back to this. Sorry! Code injection =/= SQL injection. Nor would you need a "custom" function when addslashes() and mysql_real_escape_string() both exist. Anyway, code injection is to prevent HTML entered (e.g. <script>steal_password()</script>) from displaying for all users viewing the page. You would need to htmlentities() any input that is later output so that <b>bold</b> displays as <b>bold</b> instead of bold.
|
|