Skip to content
Advertisement

Tag: php

Php file won’t load ajax request

I try query my database from javascript, using ajax request to my php file. This is my code: So I included jquery file into my folder, so that I can access it as shown above. Now my trainPassFrequency.js look like this: where trainfrequency.php only returns (echo) output of the sql query. When I run this code, I never get through

JSON.aprse() error when using php json_encode()

i know that this question asked before but i have never found anything working for my case i have 2 array which is looking like this Array ( [0] => Array ( [`19 January 2021`] => Array ( [0] => Array ( [0] => 36 [1] => 817 [2] => 67 ) ) ) ) Array ( [0] => Array

Refresh site exactly every tenth minute (like Cron)

is there any options (PHP, JavaScript) how to refresh website exactly every 10th minute? I got some crob job on server, and every 10th minute I’m reloading the online RTSP stream downloading, and after this reload the video on site get stuck, so I need reload the page every 10th minute after the cron job executed. Thanks for hints. Answer

PHP Write HTML tags into file and display it

I want to make a simple comment system in PHP and my problem is when the user type ‘<‘ it disappear because it takes it to HTML code and mess my code. So what I need to do, when the user type this into the textarea: <stdio.h>, and post it, it should appear as <stdio.h>. My PHP code: I want

Javascript not printing within php loop

new to php and javascript. I am trying to print an id using javascript within a php loop and nothing is turning up. Here is the code: Answer The problem is, that you want PHP to know, what printID() is and what it should do. PHP knows nothing about JavaScript functions, because JavaScript and PHP are executed on totally different

Advertisement