php evaluate condition using NOT operator

I have 4 sales offices, as soon as all 4 sales offices have received 20 leads each, only sales office no 4 should then receive the rest of the leads for the day. I need some help with creating the condition to basically check if sales office 1-4 have each received 20 leads and to… Read More php evaluate condition using NOT operator

php rename files when downloading

Having trouble and keep getting error with my efforts , currently have an array in this format …. $espn_ar["pid_6254"] = "2977742"; $espn_ar["pid_8269"] = "9614"; I’m using it to create url paths to download some images and name them foreach ($espn_ar as $value){ $imageUrl = "https://a.espncdn.com/combiner/i?img=/i/headshots/nfl/players/full/$value.png&h=107&w=80&scale=crop"; $imageName = "images/mfl_.$value.png"; $imageFile = file_get_contents($imageUrl); file_put_contents($imageName, $imageFile); } using… Read More php rename files when downloading

sorting table row data with php

<table class="tbmed"> <tr> <th>R1</th> <th>R2</th> <th>R3</th> <th>R4</th> </tr> <?php include ("config.php"); $sql = "SELECT id, r1, r2, r3, r4 FROM table order by id DESC "; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<tr><td>". ‘.’.$row["r1"].’.’ . "</td><td>". ‘.’.$row["r2"].’.’ . "</td><td>". ‘.’.$row["r3"].’.’ . "</td><td>". ‘.’.$row["r4"].’.’ . "</td></tr>"; } echo "</table>";… Read More sorting table row data with php

JavaScript – Character counter for multiple textareas

I have a form on my website with several different textareas. HTML/PHP foreach ($bla as $blabla) { …. other php-code (not relevant) …. echo ‘<textarea id="textarea[‘.$blabla["ID"].’]" name="textarea" maxlength="1000" onKeyUp="countChars(\’textarea[‘.$blabla["ID"].’]\’,\’count\’,\'{CHAR}\’,1000);""></textarea>’; echo ‘<span id="counter">1000</span>’; } JS: function countChars(entrance, exit, text, characters) { var entranceObj = document.getElementById(entrance); var exitObj = document.getElementById(exit); var length = characters – idObj.value.length; if… Read More JavaScript – Character counter for multiple textareas