-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Let's say we have this form, and the possible part for a user to inject malicious code is this below
...
<input type=text name=username value=<?php
echo htmlspecialchars($_POST['username']); ?
...
We can't simply put a tag, or a javascript:alert(); call, because value will be interpreted…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have my input placed into mySQL through a PDO prepared statement, and have it placed in my website with PHP using htmlspecialchars() to protect against XSS. Only problem is now I get slashes, before any quotes, that are visible on the webpage to the user it only happens when I upload it to the server…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
hi all,
if i submit data like my string using form on insert/edit view, on a list view i'll get my string as italic (like here).
how can i avoid that, and to have my string (with visible all html tags) on all forms?
tnx in adv!
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I wanted to ask that in a php script of mine which I am accessing through an ajax request, I am returning json data ( converted from an array ) as such
echo json_encode($row_array);
I get this data in jquery and display it in a form. Do i need to apply htmlspecialchars / htmlentites before returning…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I'm building a PHP intranet for my boss. A simple customer, order, quote system. It will be denied access from the Internet and only used by 3 people. I'm not so concerned with security as I am with validation. Javascript is disables on all machines.
The problem I have is this:
Employee enters…
>>> More