
Quote from Linda Rainey on February 14, 2023, 11:51 amHello Luis..
I have a link here to one of my websites to download the "Railway3000" so you can maybe test it with your newly created scripts..
https://www.poddleytaleseuro.co.uk/Downloads/Rail.zip . this is because all my apps are over your 5mbs limit..
it is in build not in web... (has the Rail.NeoApp) User = demo Password = RailDemo.
Regards
Linda..
Hello Luis..
I have a link here to one of my websites to download the "Railway3000" so you can maybe test it with your newly created scripts..
https://www.poddleytaleseuro.co.uk/Downloads/Rail.zip . this is because all my apps are over your 5mbs limit..
it is in build not in web... (has the Rail.NeoApp) User = demo Password = RailDemo.
Regards
Linda..
Uploaded files:
Quote from luishp on February 17, 2023, 12:48 pm@cdy44-2 @linda-rainey I have not forgotten this. I'm still thinking about the best solution and looking forward to find time enough.
To clone the whole application for each customer doesn't seems to me to be an efficient solution but, as SQLite databases are made from a single file, perhaps cloning the database so each user has his own one, could be a better approach.
I just need to modify how config.php works (or create an alternative plugin) to redirect all commands to the appropiate database depending on the user.What do you think?
@cdy44-2 @linda-rainey I have not forgotten this. I'm still thinking about the best solution and looking forward to find time enough.
To clone the whole application for each customer doesn't seems to me to be an efficient solution but, as SQLite databases are made from a single file, perhaps cloning the database so each user has his own one, could be a better approach.
I just need to modify how config.php works (or create an alternative plugin) to redirect all commands to the appropiate database depending on the user.
What do you think?

Quote from CDY@44 on February 17, 2023, 3:24 pmHi Luis,
I am sure that whatever you will do, it will be perfect !! Thank you so much !
regards,
Hi Luis,
I am sure that whatever you will do, it will be perfect !! Thank you so much !
regards,

Quote from Linda Rainey on February 19, 2023, 11:54 amHello Luis..
Didn't think for one minute you had forgot about it...
What I found was the main problem with the config.php was the "Hard" state in the "admin=admin" at the top of config.php .. this stops any thing else trying to "skip it" or re-rite it to the users new details... even if set to "True" further down the config.php ..
the one database "mydatabase.db" works fine as long as you change the login details for each user.. it can't be shared...
it seems there needs to be a way for user to overwrite the fixed "admin=admin" in config.php..
or login with the "admin=admin" in config.php section to get them into the app.. and add a new page with a Dbgrid plus new record button that links to the "users" little database to access when in the app and they can add and change what they want..
But you are the expert.. I am only hoping you can do something...
Regards
Linda
Hello Luis..
Didn't think for one minute you had forgot about it...
What I found was the main problem with the config.php was the "Hard" state in the "admin=admin" at the top of config.php .. this stops any thing else trying to "skip it" or re-rite it to the users new details... even if set to "True" further down the config.php ..
the one database "mydatabase.db" works fine as long as you change the login details for each user.. it can't be shared...
it seems there needs to be a way for user to overwrite the fixed "admin=admin" in config.php..
or login with the "admin=admin" in config.php section to get them into the app.. and add a new page with a Dbgrid plus new record button that links to the "users" little database to access when in the app and they can add and change what they want..
But you are the expert.. I am only hoping you can do something...
Regards
Linda
Uploaded files:
Quote from CDY@44 on February 19, 2023, 1:26 pmHi Luis,
I don't know if this can help you...or even if informations are true, but I ask to ChatGPT and he answered me that :
Hi Luis,
I don't know if this can help you...or even if informations are true, but I ask to ChatGPT and he answered me that :
Uploaded files:

Quote from luishp on February 19, 2023, 7:00 pm@linda-rainey @cdy44-2 Well I think this is a quick and easy fix. What we are going to do is to create a new file whose name is install.php with this code:
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $adminName = $_POST['adminName']; $adminPass = $_POST['adminPass']; // Update configuration file $configFile = file_get_contents('config.php'); $configFile = preg_replace('/\$adminName=".*?";/', "\$adminName=\"$adminName\";", $configFile); $configFile = preg_replace('/\$adminPass=".*?";/', "\$adminPass=\"$adminPass\";", $configFile); file_put_contents('config.php', $configFile); echo "Configuration updated."; unlink('install.php'); } ?>This script should be present within the same path as config.php. It must be called from a HTML form and it gets the new username and password. Then replaces the default ones "admin" and "admin" in the config,php file. Finally it will delete itself so the installation is done just once.
At the end we have the original config.php file but with new values for $adminName and $adminPass.
To call the install.php script you will need a FORM like this one or similar one into your app:
<form action="install.php" method="post"> <label for="adminName">Admin Username:</label> <input type="text" id="adminName" name="adminName"> <label for="adminPass">Admin Password:</label> <input type="password" id="adminPass" name="adminPass"> <button type="submit">Submit</button> </form>I hope it's clear enough. Please let me know if you have any questions.
@linda-rainey @cdy44-2 Well I think this is a quick and easy fix. What we are going to do is to create a new file whose name is install.php with this code:
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$adminName = $_POST['adminName'];
$adminPass = $_POST['adminPass'];
// Update configuration file
$configFile = file_get_contents('config.php');
$configFile = preg_replace('/\$adminName=".*?";/', "\$adminName=\"$adminName\";", $configFile);
$configFile = preg_replace('/\$adminPass=".*?";/', "\$adminPass=\"$adminPass\";", $configFile);
file_put_contents('config.php', $configFile);
echo "Configuration updated.";
unlink('install.php');
}
?>
This script should be present within the same path as config.php. It must be called from a HTML form and it gets the new username and password. Then replaces the default ones "admin" and "admin" in the config,php file. Finally it will delete itself so the installation is done just once.
At the end we have the original config.php file but with new values for $adminName and $adminPass.
To call the install.php script you will need a FORM like this one or similar one into your app:
<form action="install.php" method="post"> <label for="adminName">Admin Username:</label> <input type="text" id="adminName" name="adminName"> <label for="adminPass">Admin Password:</label> <input type="password" id="adminPass" name="adminPass"> <button type="submit">Submit</button> </form>
I hope it's clear enough. Please let me know if you have any questions.

Quote from Linda Rainey on February 19, 2023, 11:23 pmLuis...
I can do a demo to see if it works.. and upload it here..
I think this is a Great way of dealing with this problem.. which when done will benefit almost everyone in the forum...
You have worked very hard on this and I will certainly be pleased as punch! .. if it works as should..
SuperSonic Regards.
Linda..
Luis...
I can do a demo to see if it works.. and upload it here..
I think this is a Great way of dealing with this problem.. which when done will benefit almost everyone in the forum...
You have worked very hard on this and I will certainly be pleased as punch! .. if it works as should..
SuperSonic Regards.
Linda..
Uploaded files:
Quote from Linda Rainey on February 20, 2023, 11:24 amHello Luis...
It works perfect... I have made one transformation to an app "Detector3000" and I have pics below to show how it looks and the config change...
I found it best for me to let them login with the old "admin"="admin" and then when in the app the new menu "user Info" button takes them to re-register..
What this has now done for me is.. I can now go to sleep at night.. holidays.. fly to the moon if I want to... because now all my apps will be used by my downloading server without anyone being there... and buyers can now set their own logins.. before with your apps I would have had to make separate folders for each one sold.. (not really practical)
My very Best regards to you .. Your family and your dog... (if you have one)
Linda..
Hello Luis...
It works perfect... I have made one transformation to an app "Detector3000" and I have pics below to show how it looks and the config change...
I found it best for me to let them login with the old "admin"="admin" and then when in the app the new menu "user Info" button takes them to re-register..
What this has now done for me is.. I can now go to sleep at night.. holidays.. fly to the moon if I want to... because now all my apps will be used by my downloading server without anyone being there... and buyers can now set their own logins.. before with your apps I would have had to make separate folders for each one sold.. (not really practical)
My very Best regards to you .. Your family and your dog... (if you have one)
Linda..
Uploaded files:
Quote from luishp on February 20, 2023, 12:37 pm@linda-rainey great to know!
This is just a quick fix. I know a multiuser system will be much better and I'm already thinking about it.My very Best regards to you .. Your family and your dog... (if you have one)
My best wishes for you too :) And yes I have a dog! (Kyra)
@linda-rainey great to know!
This is just a quick fix. I know a multiuser system will be much better and I'm already thinking about it.
My very Best regards to you .. Your family and your dog... (if you have one)
My best wishes for you too :) And yes I have a dog! (Kyra)


Quote from Linda Rainey on February 20, 2023, 3:18 pmLuis...
Disaster!!!.. it works great.. Then!.. it changes login and removes the install.php from the directory .. so get a big Grey blank page that says install.php is not on server..
the second you touch the submit button... I have checked on a phone and does just the same.. and disconnects from session.. you getaway with it once and next time you login it has changed.. but even then it says install.php not in server..
I am sure this is something and nothing... maybe it has to be protected so as read only ... (can't be deleted) or in another folder..
No.. I have just tried "hidden".. "Read only" no good...
To Summarise if it can not delete the install.php after it has changed the login.. then it is fixed...
I am sure you will sort it...
Linda..
Luis...
Disaster!!!.. it works great.. Then!.. it changes login and removes the install.php from the directory .. so get a big Grey blank page that says install.php is not on server..
the second you touch the submit button... I have checked on a phone and does just the same.. and disconnects from session.. you getaway with it once and next time you login it has changed.. but even then it says install.php not in server..
I am sure this is something and nothing... maybe it has to be protected so as read only ... (can't be deleted) or in another folder..
No.. I have just tried "hidden".. "Read only" no good...
To Summarise if it can not delete the install.php after it has changed the login.. then it is fixed...
I am sure you will sort it...
Linda..
Uploaded files:

Quote from luishp on February 20, 2023, 3:39 pm@linda-rainey although there are some other options, just remove the unlink instruction at the end:
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $adminName = $_POST['adminName']; $adminPass = $_POST['adminPass']; // Update configuration file $configFile = file_get_contents('config.php'); $configFile = preg_replace('/\$adminName=".*?";/', "\$adminName=\"$adminName\";", $configFile); $configFile = preg_replace('/\$adminPass=".*?";/', "\$adminPass=\"$adminPass\";", $configFile); file_put_contents('config.php', $configFile); echo "Configuration updated."; } ?>This will prevent the file to auto-delete itself.
Luis
@linda-rainey although there are some other options, just remove the unlink instruction at the end:
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$adminName = $_POST['adminName'];
$adminPass = $_POST['adminPass'];
// Update configuration file
$configFile = file_get_contents('config.php');
$configFile = preg_replace('/\$adminName=".*?";/', "\$adminName=\"$adminName\";", $configFile);
$configFile = preg_replace('/\$adminPass=".*?";/', "\$adminPass=\"$adminPass\";", $configFile);
file_put_contents('config.php', $configFile);
echo "Configuration updated.";
}
?>
This will prevent the file to auto-delete itself.
Luis

Quote from Linda Rainey on February 20, 2023, 5:51 pmLuis..
That has stopped it being deleted...
But Now we have a white screen when button is clicked... and can't get back to app only on a re-start..
it has changed the logins no problem there..
Regards
Linda..
Luis..
That has stopped it being deleted...
But Now we have a white screen when button is clicked... and can't get back to app only on a re-start..
it has changed the logins no problem there..
Regards
Linda..
Uploaded files:
Quote from luishp on February 20, 2023, 6:03 pm@linda-rainey please use a Form Object instead of a traditional HTML Form.
This will send the data to the PHP script in the background instead to trying to load it as a new page:
- Add a Form Object
- In the properties panel put "action" value to "install.php"
- Add two Text Input Objects inside the Form Object
- Be sure their "property-name" are set to "adminName" and "adminPass"
- Add a Form Submit Button inside the Form Object.
- You can add some code into the Form Object "Submit" "Success" and "Fail" events if you need to.
Please take a look at the FormSubmit Sample App included with VisualNEO Web for more information.
With this change you can probably take back the auto-delete functionality to install.php file increasing the security of your apps.You are very, very close. Don't give up!
@linda-rainey please use a Form Object instead of a traditional HTML Form.
This will send the data to the PHP script in the background instead to trying to load it as a new page:
Please take a look at the FormSubmit Sample App included with VisualNEO Web for more information.
With this change you can probably take back the auto-delete functionality to install.php file increasing the security of your apps.
You are very, very close. Don't give up!

Quote from Linda Rainey on February 20, 2023, 7:11 pmThank's Luis..
I will give it a go after Tea Time...
No Doubt let you know...
Linda..
Thank's Luis..
I will give it a go after Tea Time...
No Doubt let you know...
Linda..

Quote from Linda Rainey on February 20, 2023, 11:03 pmLuis..
Still the same.. all works fine except for the Blank confirmation screen and shuts down the app..
Cure that and it is "Fab"
I made the form as you said... to the letter!.. all neat and tidy.. and added the script to the form "custom-Att" as it was the only one available.. and started it up and the script fields are overriding my nice ones on the form... my form is doing nothing...
I don't know where else I should put the script you sent or why the form does not have one..
Regards
Linda
Luis..
Still the same.. all works fine except for the Blank confirmation screen and shuts down the app..
Cure that and it is "Fab"
I made the form as you said... to the letter!.. all neat and tidy.. and added the script to the form "custom-Att" as it was the only one available.. and started it up and the script fields are overriding my nice ones on the form... my form is doing nothing...
I don't know where else I should put the script you sent or why the form does not have one..
Regards
Linda

Quote from luishp on February 20, 2023, 11:45 pmand added the script to the form "custom-Att"
@linda-rainey Which script have you added there? (PHP script should be an external file whose name is install.php)
Please check the FormSubmit Sample App included with VisualNEO Web. Please execute it to understand how it works and read the comments.
I have attached a Form sample for you to use.Regards,
and added the script to the form "custom-Att"
@linda-rainey Which script have you added there? (PHP script should be an external file whose name is install.php)
Please check the FormSubmit Sample App included with VisualNEO Web. Please execute it to understand how it works and read the comments.
I have attached a Form sample for you to use.
Regards,
Uploaded files:
Quote from Linda Rainey on February 21, 2023, 8:04 amLuis..
I have been using the form (html) script you sent for (bottom one) for Button.. Text inputs etc..) as this is the only one I had ..
your new one has a completely different way of doing things I don't even know what language this is in.. Java.. pascal. etc..
anyway I will have another go at sorting it out ...
Regards
Linda..
Luis..
I have been using the form (html) script you sent for (bottom one) for Button.. Text inputs etc..) as this is the only one I had ..
your new one has a completely different way of doing things I don't even know what language this is in.. Java.. pascal. etc..
anyway I will have another go at sorting it out ...
Regards
Linda..

Quote from Linda Rainey on February 21, 2023, 8:36 amWell now Luis..
That works in seconds...
I just wish you had done that for me day's ago...
it is Faultless... and now can carry on with the work ahead .. I will adapt it into my style and everything as far as I can see it will be fine...
I am sure that at least Half of this Forum has been waiting for this ... to me personally it is so essential when you make any mobile app you can let users change their "Demo" details to there own choice... and this will certainly do that... Luckily as a PWA Demo etc if after 7 day trial they don't pay then you have full control and just shut it down..
I am very much like you in the fact that we have been doing a job for over 25 years and expect every one to just "Do it" as it is nothing to you or me... you with your VisualNEO and me with my SketchUp 3D models (over 700 +) and I have many tutorials .. vids on how to make them ... but people just can't grasp what and how these are made.. Just like me with you when you can't understand and tearing your hair out... why I simply can't do what you are trying very hard to explain...
Example.. Here's a link to my Portfolio of over 700+ 3D Models.. so just choose one and see if you can make it...
https://3dwarehouse.sketchup.com/user/1681297886690628629544621/MylynPoddley
As Always..
My Very Best Regards..
Linda..
Well now Luis..
That works in seconds...
I just wish you had done that for me day's ago...
it is Faultless... and now can carry on with the work ahead .. I will adapt it into my style and everything as far as I can see it will be fine...
I am sure that at least Half of this Forum has been waiting for this ... to me personally it is so essential when you make any mobile app you can let users change their "Demo" details to there own choice... and this will certainly do that... Luckily as a PWA Demo etc if after 7 day trial they don't pay then you have full control and just shut it down..
I am very much like you in the fact that we have been doing a job for over 25 years and expect every one to just "Do it" as it is nothing to you or me... you with your VisualNEO and me with my SketchUp 3D models (over 700 +) and I have many tutorials .. vids on how to make them ... but people just can't grasp what and how these are made.. Just like me with you when you can't understand and tearing your hair out... why I simply can't do what you are trying very hard to explain...
Example.. Here's a link to my Portfolio of over 700+ 3D Models.. so just choose one and see if you can make it...
https://3dwarehouse.sketchup.com/user/1681297886690628629544621/MylynPoddley
As Always..
My Very Best Regards..
Linda..

Quote from luishp on February 21, 2023, 11:58 am@linda-rainey I'm glad your problem is solved.
To keep everyone needs satisfied here is not easy. I don't know each one current knowledge level and sometimes I asume the other person is understanding me, when he or she is not.I'm currently working in a way to easily share online "Web Components": predesigned and preprogrammed app chunks to be reusable in many different apps.
There is currently a Web Component Manager included with VisualNEO Web (tools menu) but with limited usage.I'm sure this will improve a lot VisualNEO Web for new users and people with limited web development knowledge.
If I'm able to produce enough components, we will have an "almost" no-code web app development tool.Kind regards.
Luis.
@linda-rainey I'm glad your problem is solved.
To keep everyone needs satisfied here is not easy. I don't know each one current knowledge level and sometimes I asume the other person is understanding me, when he or she is not.
I'm currently working in a way to easily share online "Web Components": predesigned and preprogrammed app chunks to be reusable in many different apps.
There is currently a Web Component Manager included with VisualNEO Web (tools menu) but with limited usage.
I'm sure this will improve a lot VisualNEO Web for new users and people with limited web development knowledge.
If I'm able to produce enough components, we will have an "almost" no-code web app development tool.
Kind regards.
Luis.