Comment on Show HN: My first webapp. Yikes! Read and Post Stories anonymouslyComments−samjcOP14yI made this to get into php and mysql. Constructive Criticism, and suggestions are welcome and appreciated :).−joshschreuder14yProbably needs a Recaptcha or similar (http://www.google.com/recaptcha) on the form to slow down those pesky webspammers a bit. Maybe think about nofollowing (http://en.wikipedia.org/wiki/Nofollow) any links in the story too, so you don't get used as SEO juice. My link didn't work out too well either (changed to http://www.sam-the-man.com/yikes/www.google.com)Also, make sure to filter your user input to avoid XSS attacks. I just posted a story and your page will print HTML and JS verbatim, meaning I could do malicious things. See here: https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)Apart from that, looks pretty good, well done :)−samjcOP14yThank you very much. I was hoping that the mysql_real_escape_string() function would be enough, but it did seem too easy.I will definitely look further into it! Thanks again−joshschreuder14yI'm not a PHP / MySQL guy, but this might help: http://stackoverflow.com/a/110576
Comments
I made this to get into php and mysql. Constructive Criticism, and suggestions are welcome and appreciated :).
Probably needs a Recaptcha or similar (http://www.google.com/recaptcha) on the form to slow down those pesky webspammers a bit. Maybe think about nofollowing (http://en.wikipedia.org/wiki/Nofollow) any links in the story too, so you don't get used as SEO juice. My link didn't work out too well either (changed to http://www.sam-the-man.com/yikes/www.google.com)
Also, make sure to filter your user input to avoid XSS attacks. I just posted a story and your page will print HTML and JS verbatim, meaning I could do malicious things. See here: https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
Apart from that, looks pretty good, well done :)
Thank you very much. I was hoping that the mysql_real_escape_string() function would be enough, but it did seem too easy.
I will definitely look further into it! Thanks again
I'm not a PHP / MySQL guy, but this might help: http://stackoverflow.com/a/110576