Insert Custom Field

User 2626558 Photo


Registered User
7 posts

Can you tell me where the Insert SQL Query is built. i need to insert an additional variable/field that i am passing (either with a GET or SESSION). I have a site where a user logs in and i want the users client ID to be added to the table that web form creates.
User 187934 Photo


Senior Advisor
20,271 posts

You'll have to use either some JQuery or put together your own myformname.php to process the data so you can alter the form with the needed php scripts on board.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2626558 Photo


Registered User
7 posts

well the real solution is quite a lot easier i found. this is what i did.
perhaps not the cleanest, but it works.

1. Created a "dummy" field on my form to accomodate the clientID value i wanted to store.
2. Edited the form value for the field to style= "display none"
3. Added a value= <?php echo "'" . $_SESSION['clientID'] . "'" ?>
4. renamed the .html page to .php of course
5. changed the $this variable to end in .php

works like a charm. man if i had more than 3 weeks programming and database experience i probably wouldnt have even had to think about this one. :rolleyes:
User 187934 Photo


Senior Advisor
20,271 posts

I guess I didn't understand what you were actually after. The form builder will not do a mysqlquery. You have to add the proper php and mysql scripts to the form.:) It's not necessary to change the form to php if you make a little change to your .htaccess to allow sparsing of php inside your html.:cool:
Glad you figured it out.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2626558 Photo


Registered User
7 posts

sweet advice! i will play with the .htaccess file and see what i can do. thx.
User 187934 Photo


Senior Advisor
20,271 posts

Add this to your .htaccess.:cool:
AddHandler application/x-httpd-php .php .html .htm

If you get farther into develping php your going to need some javascript to do ajax calls for example. You can sparse php in a .js document by changing the name of your .js doc to .js.php. The server will sparse the php first then the javascript. This was a huge time saver for me on a site that I was passing $_SESSION variables to my JQuery and fabric.js scripts.:cool:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2626558 Photo


Registered User
7 posts

Thanks much. sounds complicated. I will keep research it further as i learn a bit more.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.