# General PHP Help

**URL:** https://www.phphelp.com/c/general-php-help/5.md?page=2

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

**Page:** 3

---

## [Converting ounces to pounds and ounces acurately](https://www.phphelp.com/t/converting-ounces-to-pounds-and-ounces-acurately/36385)

<div class="topic-metadata">

**Author:** [@nook6](https://www.phphelp.com/u/nook6)\
**Replies:** 4\
**Last updated:** [February 6, 2025, 7:48am UTC](https://www.phphelp.com/t/converting-ounces-to-pounds-and-ounces-acurately/36385 "2025-02-06T07:48:32Z")

</div>

hi all Im writing some code at the moment where i log my fish catches when i go fishing. My problem is i want to calculate the total weight at the end of the season, I have a columns for pounds, ounces and totalounces …

---

## [PHP to check if audio present in stream.](https://www.phphelp.com/t/php-to-check-if-audio-present-in-stream/21655)

<div class="topic-metadata">

**Author:** [@bradjtrammell](https://www.phphelp.com/u/bradjtrammell)\
**Replies:** 8\
**Last updated:** [January 31, 2025, 8:25pm UTC](https://www.phphelp.com/t/php-to-check-if-audio-present-in-stream/21655 "2025-01-31T20:25:21Z")

</div>

I would like to setup a local system to check Icecast or Shoutcast streams, and if audio is present, it will recheck in ~15-30 minutes. If audio is not present it will send an email to a designated address. This is a pe…

---

## [PHP Help Needed: How to Secure User Input in Forms?](https://www.phphelp.com/t/php-help-needed-how-to-secure-user-input-in-forms/36376)

<div class="topic-metadata">

**Author:** [@marcelo00salas](https://www.phphelp.com/u/marcelo00salas)\
**Replies:** 1\
**Last updated:** [January 23, 2025, 1:46am UTC](https://www.phphelp.com/t/php-help-needed-how-to-secure-user-input-in-forms/36376 "2025-01-23T01:46:57Z")

</div>

Hi everyone, I am new to PHP and learning about securing web forms. I have read that improperly handled user input can make your site vulnerable to SQL injection, XSS and other attacks. Can someone guide me on the best…

---

## [Extension errors after installation of PHP](https://www.phphelp.com/t/extension-errors-after-installation-of-php/36374)

<div class="topic-metadata">

**Author:** [@ChimpanzeeThatMonkey](https://www.phphelp.com/u/ChimpanzeeThatMonkey)\
**Replies:** 5\
**Last updated:** [January 22, 2025, 8:31am UTC](https://www.phphelp.com/t/extension-errors-after-installation-of-php/36374 "2025-01-22T08:31:56Z")

</div>

I have finished installing the PHP MSI (to C:\\php) and receive this error when executing the standard hello world script. I have checked the PHP extensions folder configured in php.ini and it is indeed set to the correct…

---

## [Insert multiple records into database from checkboxed items in form](https://www.phphelp.com/t/insert-multiple-records-into-database-from-checkboxed-items-in-form/36371)

<div class="topic-metadata">

**Author:** [@lwaters55](https://www.phphelp.com/u/lwaters55)\
**Replies:** 1\
**Last updated:** [January 16, 2025, 3:11am UTC](https://www.phphelp.com/t/insert-multiple-records-into-database-from-checkboxed-items-in-form/36371 "2025-01-16T03:11:49Z")

</div>

I have created this page where users can check off boxes in a form for all the items they want to add. Unfortunately, it isn’t working correctly and it is adding some of the items checked but, also ones that were not che…

---

## [Trying to merge 2 php scripts](https://www.phphelp.com/t/trying-to-merge-2-php-scripts/36339)

<div class="topic-metadata">

**Author:** [@ChadMcCabe](https://www.phphelp.com/u/ChadMcCabe)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:44pm UTC](https://www.phphelp.com/t/trying-to-merge-2-php-scripts/36339 "2025-01-10T15:44:50Z")

</div>

How would I share the code and explain what I am trying to accomplish … I am stuck trying to merge one scripts functionality into another script that already does everything else I am trying to do. Thanks

---

## [How to add a postal address](https://www.phphelp.com/t/how-to-add-a-postal-address/36369)

<div class="topic-metadata">

**Author:** [@Hawkmoon](https://www.phphelp.com/u/Hawkmoon)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 3:18pm UTC](https://www.phphelp.com/t/how-to-add-a-postal-address/36369 "2025-01-10T15:18:57Z")

</div>

I am using the ACF fields plugin to add fields to a WP site, but I am struggling with how to include the address. I have the following fields: $addr1 $addr2 $town\_or\_city $county $postcode addr1 and addr2 may or m…

---

## [How to get all content from API using cURL](https://www.phphelp.com/t/how-to-get-all-content-from-api-using-curl/36355)

<div class="topic-metadata">

**Author:** [@temceo](https://www.phphelp.com/u/temceo)\
**Replies:** 4\
**Last updated:** [December 30, 2024, 10:55am UTC](https://www.phphelp.com/t/how-to-get-all-content-from-api-using-curl/36355 "2024-12-30T10:55:08Z")

</div>

Hi I am trying to get show the results of a post request (latitude / longitude) from an api call to show on an html page. The data is posted in jQuery and passed on to a php server which makes a call to the api to retri…

---

## [Pagaination hep](https://www.phphelp.com/t/pagaination-hep/36341)

<div class="topic-metadata">

**Author:** [@MarkB2024](https://www.phphelp.com/u/MarkB2024)\
**Replies:** 4\
**Last updated:** [December 12, 2024, 10:10pm UTC](https://www.phphelp.com/t/pagaination-hep/36341 "2024-12-12T22:10:08Z")

</div>

Hello Guys, Im having problems with my code when i add a new record to my mysqli database its svaing the record but isnt displaying the new one it then duplicates the 2nd newest record can anyone help please?. Its only…

---

## [Could someone please help?](https://www.phphelp.com/t/could-someone-please-help/36331)

<div class="topic-metadata">

**Author:** [@Jokrsnl93](https://www.phphelp.com/u/Jokrsnl93)\
**Replies:** 1\
**Last updated:** [December 4, 2024, 1:41am UTC](https://www.phphelp.com/t/could-someone-please-help/36331 "2024-12-04T01:41:50Z")

</div>

i have tried to use everythimg and import everything till now but in migration table of my users the hasOne function is not defined. i tried it in APP\\model and it worked and the auto complete shows it.. in migration t…

---

## [Trying to Update Multiple Records](https://www.phphelp.com/t/trying-to-update-multiple-records/36098)

<div class="topic-metadata">

**Author:** [@lwaters55](https://www.phphelp.com/u/lwaters55)\
**Replies:** 2\
**Last updated:** [December 2, 2024, 10:19am UTC](https://www.phphelp.com/t/trying-to-update-multiple-records/36098 "2024-12-02T10:19:18Z")

</div>

I am trying to update multiple records when the customer checkouts and I keep getting this error: Fatal error : Uncaught Error: Call to undefined method mysqli\_stmt::get\_result() in /home/oldmuleh/public\_html/checkout.p…

---

## [Ned help with my contact form](https://www.phphelp.com/t/ned-help-with-my-contact-form/36319)

<div class="topic-metadata">

**Author:** [@Asbjorn](https://www.phphelp.com/u/Asbjorn)\
**Replies:** 3\
**Last updated:** [November 23, 2024, 3:33am UTC](https://www.phphelp.com/t/ned-help-with-my-contact-form/36319 "2024-11-23T03:33:18Z")

</div>

I have a contact form on my new website. It is a template I bought back in 2014, so I suspect there m,ight be an upgrade problem (code too old for current version of php on the server). But I do not know enough to find t…

---

## [Help with contact form](https://www.phphelp.com/t/help-with-contact-form/36301)

<div class="topic-metadata">

**Author:** [@russellbedwards](https://www.phphelp.com/u/russellbedwards)\
**Replies:** 2\
**Last updated:** [October 25, 2024, 9:11pm UTC](https://www.phphelp.com/t/help-with-contact-form/36301 "2024-10-25T21:11:15Z")

</div>

Hi, I have a very basic cont form which only works when using Firfox. I have tested it with Chrome, Safari and Android but I don’t receive an email from any of these. Not sure what’s going on here. \<?php $name = $\_POS…

---

## [Socketio without starting php server](https://www.phphelp.com/t/socketio-without-starting-php-server/36279)

<div class="topic-metadata">

**Author:** [@adventure209](https://www.phphelp.com/u/adventure209)\
**Replies:** 1\
**Last updated:** [September 27, 2024, 12:02am UTC](https://www.phphelp.com/t/socketio-without-starting-php-server/36279 "2024-09-27T00:02:28Z")

</div>

i have a simple socketio application that im running on a web server and everytime i need to run it i have to ssh into the web server and type “php server.php start”. is there a way i can just have the socketio applicati…

---

## [Joomla and apache/php/php-fpm logging](https://www.phphelp.com/t/joomla-and-apache-php-php-fpm-logging/36283)

<div class="topic-metadata">

**Author:** [@gossamer](https://www.phphelp.com/u/gossamer)\
**Replies:** 1\
**Last updated:** [September 24, 2024, 1:12pm UTC](https://www.phphelp.com/t/joomla-and-apache-php-php-fpm-logging/36283 "2024-09-24T13:12:16Z")

</div>

I have a joomla-4.4.8 website with apache 2.4.62 on fedora40 with php-8.3.11 and having some difficulty with logging. This is on my own server, so no cpanel or dashboard. On occasion, I see 500 errors in the apache acce…

---

## [Update variable in array with result from foreach loop](https://www.phphelp.com/t/update-variable-in-array-with-result-from-foreach-loop/36257)

<div class="topic-metadata">

**Author:** [@Slimat](https://www.phphelp.com/u/Slimat)\
**Replies:** 37\
**Last updated:** [September 20, 2024, 6:49am UTC](https://www.phphelp.com/t/update-variable-in-array-with-result-from-foreach-loop/36257 "2024-09-20T06:49:53Z")

</div>

Hi all I developed and run a PHP application for my company which displays a front end to a MySQL database so suppliers can upload their stock lists to my FTP server and it is displayed on the front end if a salesman se…

---

## [Php question if u please](https://www.phphelp.com/t/php-question-if-u-please/36270)

<div class="topic-metadata">

**Author:** [@Jokrsnl93](https://www.phphelp.com/u/Jokrsnl93)\
**Replies:** 3\
**Last updated:** [September 13, 2024, 3:49am UTC](https://www.phphelp.com/t/php-question-if-u-please/36270 "2024-09-13T03:49:15Z")

</div>

\<!DOCTYPE html\> \<html\> \<body\> \<?php $array=array(1,2,3); ?\> \<script\> let i =0; let y= "\<?php echo $array\[i\] ?\>"; document.write(y); \</script\> \</body\> \</html\> It works and print the value in array if i write $array\[…

---

## [Mixed Content Error](https://www.phphelp.com/t/mixed-content-error/36259)

<div class="topic-metadata">

**Author:** [@Larry](https://www.phphelp.com/u/Larry)\
**Replies:** 18\
**Last updated:** [September 11, 2024, 6:53pm UTC](https://www.phphelp.com/t/mixed-content-error/36259 "2024-09-11T18:53:37Z")

</div>

Hello I recently forced HTTPS on my website, and the pages are now not rendering properly. When running a scan from Why No Padlock, it gave the following error: A script with an insecure url of “http://www.luxurybeach.…

---

## [Issue with upload\_max\_filesize](https://www.phphelp.com/t/issue-with-upload-max-filesize/36267)

<div class="topic-metadata">

**Author:** [@llyon](https://www.phphelp.com/u/llyon)\
**Replies:** 5\
**Last updated:** [September 9, 2024, 6:12am UTC](https://www.phphelp.com/t/issue-with-upload-max-filesize/36267 "2024-09-09T06:12:43Z")

</div>

I have the following settings in my PHP.INI (there is only one, this is on a test server on Windows and is located in D:\\WWW\\PHP) post\_max\_size=184M upload\_max\_filesize=184M However, despite restarting Apache and also…

---

## [Trying to get my PHP to generate emails](https://www.phphelp.com/t/trying-to-get-my-php-to-generate-emails/36261)

<div class="topic-metadata">

**Author:** [@shinyslowqueen](https://www.phphelp.com/u/shinyslowqueen)\
**Replies:** 3\
**Last updated:** [August 28, 2024, 12:34am UTC](https://www.phphelp.com/t/trying-to-get-my-php-to-generate-emails/36261 "2024-08-28T00:34:56Z")

</div>

I have a form on my website that calls a PHP script hosted on another website. The script is supposed to generate two emails - one to me to alert that the form has been filled out, and one to the user as a confirmation e…

---

## [Need to add custom currency name and symbol in wordpress php code and ned help to run this code as it is not working](https://www.phphelp.com/t/need-to-add-custom-currency-name-and-symbol-in-wordpress-php-code-and-ned-help-to-run-this-code-as-it-is-not-working/36255)

<div class="topic-metadata">

**Author:** [@Fatima](https://www.phphelp.com/u/Fatima)\
**Replies:** 0\
**Last updated:** [August 21, 2024, 8:59pm UTC](https://www.phphelp.com/t/need-to-add-custom-currency-name-and-symbol-in-wordpress-php-code-and-ned-help-to-run-this-code-as-it-is-not-working/36255 "2024-08-21T20:59:07Z")

</div>

---

## [Get details from php array](https://www.phphelp.com/t/get-details-from-php-array/36251)

<div class="topic-metadata">

**Author:** [@vikaspa](https://www.phphelp.com/u/vikaspa)\
**Replies:** 1\
**Last updated:** [August 19, 2024, 7:38pm UTC](https://www.phphelp.com/t/get-details-from-php-array/36251 "2024-08-19T19:38:30Z")

</div>

Dear All, I am uploading an excel with 2 columns Yes i can read excel file. sample attached. Code \<?php require 'vendor/autoload.php'; use PhpOffice\\PhpSpreadsheet\\IOFactory; try { $spreadsheet = IOFactory::loa…

---

## [Use of undefined constant MYSQL\_ASSOC](https://www.phphelp.com/t/use-of-undefined-constant-mysql-assoc/36220)

<div class="topic-metadata">

**Author:** [@Neo71](https://www.phphelp.com/u/Neo71)\
**Replies:** 7\
**Last updated:** [August 13, 2024, 3:09pm UTC](https://www.phphelp.com/t/use-of-undefined-constant-mysql-assoc/36220 "2024-08-13T15:09:11Z")

</div>

in 2019 I created a php page which created graphs via Google using data inserted into a DB: \<?php include\_once 'dbconfig.php'; $query = "SELECT \* FROM elezioni2019\_liste"; $result = mysql\_query($query) or die(mysql\_erro…

---

## [Code for making profile visible to only those who fit your criteria](https://www.phphelp.com/t/code-for-making-profile-visible-to-only-those-who-fit-your-criteria/36241)

<div class="topic-metadata">

**Author:** [@newbie99](https://www.phphelp.com/u/newbie99)\
**Replies:** 0\
**Last updated:** [August 10, 2024, 3:44pm UTC](https://www.phphelp.com/t/code-for-making-profile-visible-to-only-those-who-fit-your-criteria/36241 "2024-08-10T15:44:22Z")

</div>

Hello everyone, nice to meet you, hope you’re all doing well :blush: I’m a newbie coder, just learning PHP, variables, functions etc. I did a course where we used Replit to help us code. I’m still getting my head aroun…

---

## [How to use window.open to open google.com page](https://www.phphelp.com/t/how-to-use-window-open-to-open-google-com-page/36215)

<div class="topic-metadata">

**Author:** [@PeterR](https://www.phphelp.com/u/PeterR)\
**Replies:** 0\
**Last updated:** [July 18, 2024, 4:35pm UTC](https://www.phphelp.com/t/how-to-use-window-open-to-open-google-com-page/36215 "2024-07-18T16:35:33Z")

</div>

I’m a beginner learning html and want to learn to do something useful calling window.open for example, loading a url like https://www.google.com My 9 line script attempt below failed. Would kindly appreciate a suggest…

---

## [Downloading files from google drive to server with php code is very slow](https://www.phphelp.com/t/downloading-files-from-google-drive-to-server-with-php-code-is-very-slow/36108)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 8\
**Last updated:** [July 14, 2024, 9:30pm UTC](https://www.phphelp.com/t/downloading-files-from-google-drive-to-server-with-php-code-is-very-slow/36108 "2024-07-14T21:30:14Z")

</div>

Hello, I make automatic backups with Google Drive service account using PHP. For example, manually downloading a 10 MB file to the remote server takes 5 minutes. It wasn’t this slow before, what could be the reason? A…

---

## [How to Securely Implement User Authentication in a PHP Application?](https://www.phphelp.com/t/how-to-securely-implement-user-authentication-in-a-php-application/36189)

<div class="topic-metadata">

**Author:** [@asshleyymariei](https://www.phphelp.com/u/asshleyymariei)\
**Replies:** 2\
**Last updated:** [July 13, 2024, 7:15am UTC](https://www.phphelp.com/t/how-to-securely-implement-user-authentication-in-a-php-application/36189 "2024-07-13T07:15:35Z")

</div>

Hello guys! :smiling\_face\_with\_three\_hearts: I am building a web app with PHP, and I’ve got the login and signup stuff working. But security is key, and I want to make sure everything is super safe for my users. Here i…

---

## [Image Process is stopping in between](https://www.phphelp.com/t/image-process-is-stopping-in-between/35705)

<div class="topic-metadata">

**Author:** [@sureshbvs](https://www.phphelp.com/u/sureshbvs)\
**Replies:** 2\
**Last updated:** [July 12, 2024, 9:46am UTC](https://www.phphelp.com/t/image-process-is-stopping-in-between/35705 "2024-07-12T09:46:26Z")

</div>

Hi, I have written a code to crop the images. Its working perfectly well. Then I tried to loop the process to read images inside more folders. But when I tried to loop the same, the process is breaking after completing…

---

## [Re-running a script once a minute](https://www.phphelp.com/t/re-running-a-script-once-a-minute/35749)

<div class="topic-metadata">

**Author:** [@lewmur](https://www.phphelp.com/u/lewmur)\
**Replies:** 5\
**Last updated:** [July 12, 2024, 9:30am UTC](https://www.phphelp.com/t/re-running-a-script-once-a-minute/35749 "2024-07-12T09:30:40Z")

</div>

I have a simple script to read and echo a text file and close the file. The file is constantly being edited, so I want to re-run the script once a minute. I know I did this some time ago but I’m 84 and don’t remember h…

---

## [Is there any way top enumerate all PHP variables?](https://www.phphelp.com/t/is-there-any-way-top-enumerate-all-php-variables/36168)

<div class="topic-metadata">

**Author:** [@MazzCole](https://www.phphelp.com/u/MazzCole)\
**Replies:** 5\
**Last updated:** [July 11, 2024, 6:50am UTC](https://www.phphelp.com/t/is-there-any-way-top-enumerate-all-php-variables/36168 "2024-07-11T06:50:58Z")

</div>

PHP $\_POST has an Array structure. I would like to run a script like the following $postSize= … // how to get the POST variables number ? for ($i=0; $i\< $postSize; i++) { echo $i . “–\>” . … // how…

[Previous page](https://www.phphelp.com/c/general-php-help/5.md?page=1)

[Next page](https://www.phphelp.com/c/general-php-help/5.md?page=3)
