PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → PHP Page - disappearing values from entry controls (?button causes a page refresh?)
PHP Page - disappearing values from entry controls (?button causes a page refresh?)
Débuté par vvido, 09 aoû. 2018 17:10 - 4 réponses
Membre enregistré
94 messages
Posté le 09 août 2018 - 17:10
I have created a simple PHP page for data entry.
This test page has two entry controls, one numeric and one for text.

When I enter the values, they are displayed correctly (as entered).

If I click on a button on this page, the entered values are replaced with the initial values.
This is crazy.
What kind of setting for the page could cause this ?

Background:
This page should allow the user to modify data from a single table in the database.
In the initialization FileToPage is called (this works ok, displays the database values).
Then the user can modify the data.
When the button for saving is clicked, the entered values are replaced by the initial values (no, I did not forget to call PageToFile)

I have added a dummy button, just to see what is happening. Obviously a click causes a page refresh
(the button description: send the values of controls... (submit))

Clicking on this dummy button resets all entry controls to their initial values (linked with file or not linked)

The code of this button contains only a call to Info("bla bla").
When I click on this button, all entry controls are replaced with initial values (?reinitialized).
The page is displayed again (blinks)
This button makes no processing (no code at all), but confirms that click causes loss of entered data

I can not trace where the problem is. Is PHP processing so different from the regular webdev pages ???
Membre enregistré
94 messages
Posté le 28 août 2018 - 16:27
really nobody ?

I really do not know how to continue.

I have even tried the RAD generation which generated a looper which calls a form page. Same problem.
PageToFile is called in the button click code (server) but no entered data is there.

The looper shows actual database data (the connection is ok).
One new row is added to the table (therefore we have INSERT granted)
Only the automatic identity field has a value (incremented each time).
Posté le 28 août 2018 - 23:53
Hi

php is the least interesting of all the possible options in webdev, and
as such there are not a lot of people using it, and therefore answers...

So my advice would be clearly to switch to awp or classic mode if you do
not have a VERY good reason to stick to php

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


On 8/28/2018 8:27 AM, vvido wrote:
really nobody ?

I really do not know how to continue.

I have even tried the RAD generation which generated a looper which
calls a form page. Same problem.
PageToFile is called in the button click code (server) but no entered
data is there.

The looper shows actual database data (the connection is ok).
One new row is added to the table (therefore we have INSERT granted)
Only the automatic identity field has a value (incremented each time).
Membre enregistré
94 messages
Posté le 31 août 2018 - 11:03
Thanks for the answer, but there is a reason to use PHP.

This is a small nonprofit project where installing Webdev Application Server is not an option.

It seems that for this project I will have to use a different developing tool (I am quite unhappy).
Posté le 31 août 2018 - 13:28
are you telling me that they cannot host their project for 5€/month?

even a small non profit can afford THAT...

On 8/31/2018 3:03 AM, vvido wrote:
Thanks for the answer, but there is a reason to use PHP.
This is a small nonprofit project where installing Webdev Application
Server is not an option.
It seems that for this project I will have to use a different developing
tool (I am quite unhappy).