Skip to content

Tag: javascript

Sending a JSON string to HTML that is too large

I’m using Codeigniter4, and I generate a rather long JSON so that I can make map points with it. However, when I pass along the string with And attempted to unpack the string on the html side with I get a syntax error because the entire json string was not sent. I have tested my setup with a smaller amo…

Prevent XSS attacks when echoing HTML using PHP

I have a simple bimple function which echoes this: This just works fine, but If a user edits the HTML using a Chrome or Firefox, he can modify the code to output something like: I have set the only http on the php ini relating the cookies, but is there any way to prevent the user from modifying and successful…

The cookie is not created js

I’m planning a registration system. Right now I’m trying to send a randomly generated session string to the mysql db; besides sending it on db I want to create a cookie with the js that contains the session string. I tried with the following code but I don’t know why the cookie is not genera…

How to change the me when receiving email on contact us

I’ve created an contact us form using PHP Mailer, however the problem is when I received the email the name before you open it is me and I can’t figured out how to fix it. Also I appreciate it if someone explain to me what is the different between Username and the add Address. Thank you in advance…

HTML Calendar and JS problems

I would like to make a Javascript-based calendar for managing holidays. My problem is, I am using a SQL database to store the holidays, which I am accessing with PHP. How can I use the results of the PHP query in a JS Script ? For example, to add holidays for an employee i have to do that : When