Adding form data to CMSB
8 posts by 2 authors in: Forums > CMS Builder
Last Post: October 7, 2008 (RSS)
By aev - October 1, 2008
http://www.interactivetools.com/forum/gforum.cgi?post=64265#64265
..for adding form data to CMSB.
The script is pretty understandable, but it left me wonder how it can add data to my database without authenticating?
-aev-
Re: [aev] Adding form data to CMSB
By Dave - October 1, 2008
Your MySQL login details are stored in /data/settings.dat.php and the line that loads /lib/init.php runs some code to automatically login.
So /lib/init.php is authenticating for you.
Hope that helps!
interactivetools.com
Re: [Dave] Adding form data to CMSB
By aev - October 2, 2008
ok, thanks for explaining this.
Will this code work in PHP 4.3.0+ and MySQL 4.1.7+, like the rest of CMSB?
-aev-
Re: [aev] Adding form data to CMSB
By Dave - October 2, 2008
interactivetools.com
Re: [Dave] Adding form data to CMSB
By aev - October 6, 2008
I would like to add an image upload to this form, how can we do that?
-aev-
Re: [aev] Adding form data to CMSB
By Dave - October 6, 2008
interactivetools.com
Re: [Dave] Adding form data to CMSB
By aev - October 6, 2008
What I'm really trying to do here is to make another (custom) php script send an image and some text to the CMSB's database. Is this scenario making any difference than coming from a HTML form?
For the text part it was pretty straightforward to use the php part from the form inside my script.
-aev-
Re: [aev] Adding form data to CMSB
By Dave - October 7, 2008
If you're writing a custom php script basically you can just save the upload to the upload dir and then insert information about it into the upload table.
If you want to re-size the images as well you can take a look at the saveResampledImageAs() function.
Hope that helps!
interactivetools.com