# Latest

**URL:** https://www.phphelp.com/latest.md

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

---

## [Mb\_str\_pad and escape sequences](https://www.phphelp.com/t/mb-str-pad-and-escape-sequences/36703)

<div class="topic-metadata">

**Author:** [@mcg](https://www.phphelp.com/u/mcg)\
**Replies:** 2\
**Last updated:** [July 28, 2026, 6:07pm UTC](https://www.phphelp.com/t/mb-str-pad-and-escape-sequences/36703 "2026-07-28T18:07:30Z")

</div>

Hello all; When padding a string for display in a CLI script, I’ve found that escape sequences seem to confuse the mb\_str\_pad() function. Specifically, say I want a list of results for the word time: pretend the result…

---

## [Email Loop - One Email Rather Than Many](https://www.phphelp.com/t/email-loop-one-email-rather-than-many/31188)

<div class="topic-metadata">

**Author:** [@Leemo](https://www.phphelp.com/u/Leemo)\
**Replies:** 8\
**Last updated:** [March 2, 2020, 5:34pm UTC](https://www.phphelp.com/t/email-loop-one-email-rather-than-many/31188 "2020-03-02T17:34:37Z")

</div>

I have rows of data that when a save all button is pressed the contents of the changes are sent in an Email to myself. The code below works OK, but sends each record as a separate Email. I would prefer all the data to b…

---

## [Merging One Array's Key on Second Array's Values](https://www.phphelp.com/t/merging-one-arrays-key-on-second-arrays-values/36682)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 17\
**Last updated:** [December 29, 2025, 3:40am UTC](https://www.phphelp.com/t/merging-one-arrays-key-on-second-arrays-values/36682 "2025-12-29T03:40:36Z")

</div>

I have two two-dimensional arrays that need to be merged into a single multi-dimensional array that has all values based on matching the key in one to one of the values in the other. The example below has been simplified…

---

## [Problem with while loop](https://www.phphelp.com/t/problem-with-while-loop/36681)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 3\
**Last updated:** [December 27, 2025, 9:07pm UTC](https://www.phphelp.com/t/problem-with-while-loop/36681 "2025-12-27T21:07:55Z")

</div>

I have a little panel on the site’s home page which should show news items recently submitted. If there are no news items, the panel is not shown. There is a form which sends an item to a DB table. This works, I have che…

---

## [Date() or strtotime() Losing Day Value](https://www.phphelp.com/t/date-or-strtotime-losing-day-value/36680)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 3\
**Last updated:** [December 20, 2025, 12:23am UTC](https://www.phphelp.com/t/date-or-strtotime-losing-day-value/36680 "2025-12-20T00:23:18Z")

</div>

In a MySQL DATE column with the date formatted as 1954-06-15, date('Y-m-d', strtotime($row)) returns 1954-06-01 every time. Am I missing something here?

---

## [Php mail not received by gmail](https://www.phphelp.com/t/php-mail-not-received-by-gmail/36659)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 12\
**Last updated:** [December 15, 2025, 4:14pm UTC](https://www.phphelp.com/t/php-mail-not-received-by-gmail/36659 "2025-12-15T16:14:09Z")

</div>

First off, this isnt a coding problem but a general question. I have written a PHP routine that sends email from a form. It works, because I got the test mail message straight away, and correctly formatted, on my non-gma…

---

## [DIRECTORY\_SEPARATOR vs Hard-Coded Slash](https://www.phphelp.com/t/directory-separator-vs-hard-coded-slash/36588)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 8\
**Last updated:** [December 7, 2025, 10:44pm UTC](https://www.phphelp.com/t/directory-separator-vs-hard-coded-slash/36588 "2025-12-07T22:44:05Z")

</div>

This is more of a comment than it is a question. Typically my development sites run on a desktop PC under Linux and Apache so I’ve always just hard-coded slashes but I’m in the midst of completely reprogramming everythi…

---

## [Reading a text file from remote server into function, div and span](https://www.phphelp.com/t/reading-a-text-file-from-remote-server-into-function-div-and-span/36667)

<div class="topic-metadata">

**Author:** [@mpg](https://www.phphelp.com/u/mpg)\
**Replies:** 2\
**Last updated:** [December 6, 2025, 8:46pm UTC](https://www.phphelp.com/t/reading-a-text-file-from-remote-server-into-function-div-and-span/36667 "2025-12-06T20:46:27Z")

</div>

I can successfully read this file as expected using echo… \<?php echo file\_get\_contents("http://pictureclock.ca/ip/ip.txt"); ?\> But I can’t seem to read this the same way in this code, i must be missing something. Perha…

---

## [Simple but missing some key ways to make work](https://www.phphelp.com/t/simple-but-missing-some-key-ways-to-make-work/36666)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 0\
**Last updated:** [December 5, 2025, 5:12pm UTC](https://www.phphelp.com/t/simple-but-missing-some-key-ways-to-make-work/36666 "2025-12-05T17:12:56Z")

</div>

I have tried all these CMS, on my site, and pretty much all complicated and convoluted. Pluck is really simple and easy to understand. But where is a document on how to do stuff. There is a disconnect for the blog, and …

---

## [Pluck Improvements](https://www.phphelp.com/t/pluck-improvements/23458)

<div class="topic-metadata">

**Author:** [@benanamen](https://www.phphelp.com/u/benanamen)\
**Replies:** 15\
**Last updated:** [December 5, 2025, 5:07pm UTC](https://www.phphelp.com/t/pluck-improvements/23458 "2025-12-05T17:07:55Z")

</div>

I took a quick look at a couple pages of Pluck. First thing I noticed was code bloat. There is unnecessary repetitive code. Second thing I noticed is there is no separation of html and code (Logic from Presentation). I d…

---

## [Having trouble uploading photo files](https://www.phphelp.com/t/having-trouble-uploading-photo-files/36665)

<div class="topic-metadata">

**Author:** [@ancog](https://www.phphelp.com/u/ancog)\
**Replies:** 0\
**Last updated:** [December 4, 2025, 8:02pm UTC](https://www.phphelp.com/t/having-trouble-uploading-photo-files/36665 "2025-12-04T20:02:55Z")

</div>

I tried to upload a file to a post I was writing for a post I was writing in a forum that uses php, and found that I got an error message. The file was from the photos on my ipad. I tried reducing the file size by plac…

---

## [Blog and Photos](https://www.phphelp.com/t/blog-and-photos/36663)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 0\
**Last updated:** [December 4, 2025, 7:22pm UTC](https://www.phphelp.com/t/blog-and-photos/36663 "2025-12-04T19:22:29Z")

</div>

Installed the modules, now what. just displays a page titled Blog and Photos

---

## [Contact module](https://www.phphelp.com/t/contact-module/36662)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 0\
**Last updated:** [December 4, 2025, 7:18pm UTC](https://www.phphelp.com/t/contact-module/36662 "2025-12-04T19:18:20Z")

</div>

Where do the entries go?

---

## [\[For Hire\] Web Developer available for Full time Position](https://www.phphelp.com/t/for-hire-web-developer-available-for-full-time-position/36661)

<div class="topic-metadata">

**Author:** [@deepvyas](https://www.phphelp.com/u/deepvyas)\
**Replies:** 0\
**Last updated:** [November 26, 2025, 1:34pm UTC](https://www.phphelp.com/t/for-hire-web-developer-available-for-full-time-position/36661 "2025-11-26T13:34:36Z")

</div>

Hello , If you need any assistance related to website design and development. You can connect over e-mail: deepvyas71@gmail.com Regards Deep

---

## [Contenate User Global in Inline Style](https://www.phphelp.com/t/contenate-user-global-in-inline-style/36660)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 4\
**Last updated:** [November 25, 2025, 11:09pm UTC](https://www.phphelp.com/t/contenate-user-global-in-inline-style/36660 "2025-11-25T23:09:16Z")

</div>

I can’t seem to work out the syntax for adding a user defined global variable value into an inline style that uses single quotes. This is the line as it is and working: $Output .= "\<img id=\\"".COMMON\_REL\_IMAGES."refres…

---

## [One block works but not the other](https://www.phphelp.com/t/one-block-works-but-not-the-other/36654)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 6\
**Last updated:** [November 23, 2025, 11:31pm UTC](https://www.phphelp.com/t/one-block-works-but-not-the-other/36654 "2025-11-23T23:31:46Z")

</div>

Thought it was too good to last! Smitten with my own success(?) I have also done a form which allows the sending of the same email to either all members or just the committee members. Form contains 2 radio buttons, same …

---

## [Image not showing although other variables are](https://www.phphelp.com/t/image-not-showing-although-other-variables-are/36652)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 2\
**Last updated:** [November 20, 2025, 9:56am UTC](https://www.phphelp.com/t/image-not-showing-although-other-variables-are/36652 "2025-11-20T09:56:10Z")

</div>

I have a page that gets 4 bits of info from a small database. I know it works because all of the other variables are echoed properly. The one that doesnt get echoed is the variable for the picture. I get the ‘broken imag…

---

## [Can I use a PHP variable in a session?](https://www.phphelp.com/t/can-i-use-a-php-variable-in-a-session/36615)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 17\
**Last updated:** [November 14, 2025, 4:30pm UTC](https://www.phphelp.com/t/can-i-use-a-php-variable-in-a-session/36615 "2025-11-14T16:30:19Z")

</div>

I have a routine which gets member info from a database (works fine!) and puts the data into text boxes on a form (also works fine). The form has 2 buttons, one to update the details in the text boxes, the other to delet…

---

## [Adding Color Gradient to Text in ImageMagick](https://www.phphelp.com/t/adding-color-gradient-to-text-in-imagemagick/36645)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 2\
**Last updated:** [November 13, 2025, 3:21am UTC](https://www.phphelp.com/t/adding-color-gradient-to-text-in-imagemagick/36645 "2025-11-13T03:21:22Z")

</div>

Just starting with ImageMagick after having used GD Library for decades and so far ImageMagick is far, far easier! However, I can’t seem to create a horizontal gradient in the first block in the code below. I would like …

---

## [Insert html code into a mysql/mariadb field](https://www.phphelp.com/t/insert-html-code-into-a-mysql-mariadb-field/36649)

<div class="topic-metadata">

**Author:** [@icebowl](https://www.phphelp.com/u/icebowl)\
**Replies:** 3\
**Last updated:** [November 10, 2025, 2:17pm UTC](https://www.phphelp.com/t/insert-html-code-into-a-mysql-mariadb-field/36649 "2025-11-10T14:17:23Z")

</div>

I want to be able to insert html code into a mysql/mariadb field. Security is not an issue. It is a local network. number is longtext Here is my table: CREATE TABLE \`formdata\` ( \`id\` int(32) NOT NULL AUTO\_INCREMEN…

---

## [Php mail script being activated by bots](https://www.phphelp.com/t/php-mail-script-being-activated-by-bots/36364)

<div class="topic-metadata">

**Author:** [@increase](https://www.phphelp.com/u/increase)\
**Replies:** 7\
**Last updated:** [November 1, 2025, 7:12pm UTC](https://www.phphelp.com/t/php-mail-script-being-activated-by-bots/36364 "2025-11-01T19:12:48Z")

</div>

I have two php scripts which send out mail to a group and are executed by site admin from a password ptotecetd menu, but the scripts keeps getting activated by bots scarping the site. I have tried to set a robots.txt fi…

---

## [File Size problem](https://www.phphelp.com/t/file-size-problem/36642)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 2\
**Last updated:** [October 29, 2025, 11:35pm UTC](https://www.phphelp.com/t/file-size-problem/36642 "2025-10-29T23:35:50Z")

</div>

Hi, I have hit a bit of a hiccup! Doing some testing before completing a file upload, and my problem is the opposite to most file size troubles! I want to put a limit on the size a user can upload, and to do this I have…

---

## [Logic right but variable do not stay on error, status line?](https://www.phphelp.com/t/logic-right-but-variable-do-not-stay-on-error-status-line/36628)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 6\
**Last updated:** [October 20, 2025, 2:18am UTC](https://www.phphelp.com/t/logic-right-but-variable-do-not-stay-on-error-status-line/36628 "2025-10-20T02:18:49Z")

</div>

\<?php //Logic php is re-entrant. User enters data, db good, fields reset and message on status line. //can enter again, have to add button to return to main menu. //if db error, display error on status line, leave data i…

---

## [Variable is out of scope](https://www.phphelp.com/t/variable-is-out-of-scope/36626)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 1\
**Last updated:** [October 19, 2025, 3:43pm UTC](https://www.phphelp.com/t/variable-is-out-of-scope/36626 "2025-10-19T15:43:22Z")

</div>

why is my code all catawampus? dbopen return the PDO object which passed to dbupdate and is undefined at that point, WHY? include(“db.php”); include(“config.php”); $pdo=""; if ($\_SESSION\[“onlinestat”\] == “0”) { …

---

## [Debugger](https://www.phphelp.com/t/debugger/36619)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 2\
**Last updated:** [October 18, 2025, 3:30pm UTC](https://www.phphelp.com/t/debugger/36619 "2025-10-18T15:30:32Z")

</div>

Has anyone successfully used a php debugger. I used to use Komodo for Perl years ago. But that seems to have gone away. It has been a struggle, watching on YouTube. After months ran across VSCode which seemed to be pre…

---

## [Best implementation forms entry](https://www.phphelp.com/t/best-implementation-forms-entry/36622)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 12\
**Last updated:** [October 17, 2025, 6:53pm UTC](https://www.phphelp.com/t/best-implementation-forms-entry/36622 "2025-10-17T18:53:40Z")

</div>

I have a forms.php to get contact data, name, address, etc. Last field is a status line of 72 bytes. with submit, reset & cancel buttons. action=update.php method=POST update.php inserts the data into mysql table, and…

---

## [Sql query with date not going to database](https://www.phphelp.com/t/sql-query-with-date-not-going-to-database/36587)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 11\
**Last updated:** [October 16, 2025, 2:44am UTC](https://www.phphelp.com/t/sql-query-with-date-not-going-to-database/36587 "2025-10-16T02:44:21Z")

</div>

Hi, I am having huge trouble getting a date to the DB. Values for month,day,year come from text boxes on a form. I get no ‘die’ message but the database is empty. I am sure my confusion arises due to the difference betwe…

---

## [How do I Pluck](https://www.phphelp.com/t/how-do-i-pluck/36621)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 0\
**Last updated:** [October 16, 2025, 1:35am UTC](https://www.phphelp.com/t/how-do-i-pluck/36621 "2025-10-16T01:35:06Z")

</div>

I have my simple mail php to get data and do a mail function. In another folder at same level as pluck. To make it work i inserted a link and user has to click to load. How do I load like header(“Location: …/mail”); in…

---

## [Try and catch not working - duplicate key](https://www.phphelp.com/t/try-and-catch-not-working-duplicate-key/36618)

<div class="topic-metadata">

**Author:** [@cdlvj130](https://www.phphelp.com/u/cdlvj130)\
**Replies:** 9\
**Last updated:** [October 15, 2025, 5:15pm UTC](https://www.phphelp.com/t/try-and-catch-not-working-duplicate-key/36618 "2025-10-15T17:15:59Z")

</div>

\<?php include("config.php"); extract($\_POST); $sql = "INSERT INTO contacts (firstname, lastname, phone, email, address, city, state, zipcode) VALUES ('$fname','$lname','$phone','$email','$address','$city','$state','$z…

---

## [Determing if Datetime or Timestamp](https://www.phphelp.com/t/determing-if-datetime-or-timestamp/36606)

<div class="topic-metadata">

**Author:** [@PCHome](https://www.phphelp.com/u/PCHome)\
**Replies:** 3\
**Last updated:** [October 7, 2025, 11:46pm UTC](https://www.phphelp.com/t/determing-if-datetime-or-timestamp/36606 "2025-10-07T23:46:51Z")

</div>

I’m slowly converting all my sites over from the Unix Timestamp to MySQL Datetime and in the process I need a way to determine which it is so that the sites do not break or crash while working on them. For the most part …

[Next page](https://www.phphelp.com/latest.md?page=1)
