Category : javascript

I have this JS code which sends a post request to a PHP script named upload.php. The request contains a string base64. var formData = new FormData(); formData.append(“base64”, base64); var xhttp = new XMLHttpRequest(); xhttp.open(“POST”, “upload.php”, true); xhttp.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”); xhttp.send(formData); upload.php contains the following code: <?php echo “hi1 “; if(isset($_POST[“submit”])) { echo “hi2 “; echo ..

Read more

I have a html/php code as shown below which displays list of links coming from wordpress. html/php: <header class="entry-header container grid-flex"> <div class="flex-item -sm-50"> <button>Thumbs</button> </div> </header><!– .entry-header –> <div class="entry-content"> <?php echo "<pre>"; print_r($all_list); echo "</pre>"; // Line A echo "<hr>"; echo "Active List<br>"; echo "<pre>"; print_r($active_list); echo "</pre>"; // Line B echo "<hr>"; ..

Read more