"&" saving to database like "&"

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
melcv
User
Posts: 3

"&" saving to database like "&"

Post by melcv »

I don't know if it happens to someone else:

When I save a data with "&" but when i check in the base it is stored as "&" not as "&".

Can someone explain this to me? Or why this happens?


mobhar
User
Posts: 11660

Post by mobhar »

It's a XSS protection. If you want to save & character without changing to &, then you may simply put this following code in Page_Load server event of your Add/Edit Page:

$this->YourFieldName->Raw = true; // adjust YourFieldName to your actual field name

That means, you are sure that field will contain the raw (original) data when will be saved into database.


Post Reply