hi
i want to include in my cmsms my php code which was made last year
i want to process some data from a form
if the data is ok-i put the data in the database
if not-i want to echo some error message and to maintain the data in the form inputs
in this way
">
details:
- i made a gcb for the html part
- i made a user defined tag for php part
my question:
1. how can i make to submit the page in the same page where the form is?
2. how can i maintain the data in the form inputs if it was an error?
- i must use the smarty assign or it is another possibility?
3. how can i use in my php part something like this-require_once('functions.php') where function.php is a file with my functions
- where i must upload this function.php
thanks
PHP code and HTML forms
PHP code and HTML forms
Last edited by pumuklee on Wed Feb 07, 2007 2:48 pm, edited 1 time in total.
Re: PHP code and HTML forms
May be the best way to do it is to contribute your code to the FormBuilder and FormBrowser modules.pumuklee wrote: hi
i want to include in my cmsms my php code which was made last year
GCB for HTML and UDT for PHP scripting... sounds ok...i want to process some data from a form
if the data is ok-i put the data in the database
if not-i want to echo some error message and to maintain the data in the form inputs
in this way
">
details:
- i made a gcb for the html part
- i made a user defined tag for php part
my question:
1. how can i make to submit the page in the same page where the form is?
2. how can i maintain the data in the form inputs if it was an error?
- i must use the smarty assign or it is another possibility?
3. how can i use in my php part something like this-require_once('functions.php') where function.php is a file with my functions
- where i must upload this function.php
thanks
A1. doesn't ' action=' work ?
A2. may be transform your GCB to a UDT which deals with the form inputs if present ?
A3. this is PHP specific and I don't know much about it but I suppose you can do what you want and first try several places.
But... I strongly suggest to use existing modules. CMSms doesn't require any PHP knowledge.
Have fun
PM