That will handle SQL injection for you as it includes the zen_db_prepare_input() function.
Absolute
That will handle SQL injection for you as it includes the zen_db_prepare_input() function.
Absolute
Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store
Thanks That is what I needed for my membership project
Ive been wracking my brain for a few hours now on how to make a radio button group
I found
in includes/functions/html_output.php and I can get it to show a button on the page if i declair $name, $value, but i have no idea what $parameters should be.PHP Code:function zen_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
return zen_draw_selection_field($name, 'radio', $value, $checked, $parameters);
}
Obviously I have more than one set of options and values so im at a loss on how to get my options and values output onto the page.
Any help or pointers to some example code is much apreciated
Thanks in advance![]()
Parameters is a catch-all for anything else you need e.g. 'class="myRadioButton"'. You don't have to put anything in there if you don't need anything.
You would use this function once of each option/value combination, grouping the options by giving them the same name, with each value for that option having its own unique value.
You'll probably want to sprinkle lightly with LABEL tags too.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
That time to bug you for help again
Ive tried and got no where with trying to make a feild required![]()
I am also struggling with a seperate javascript fix![]()
So once again, any help or pointers on making a feild required would be very much appreciated.
Im sure a donation will be made, for the help in the forums and for the zencart system when my site is up and running
I have made a fair few mods as well that I'd like to share with others, once the dust has settled.
Last edited by eddyboy; 11 Feb 2009 at 05:33 PM. Reason: typos
Ok, from the top!
The way you add new fields has been shown earlier in this thread.
To make them required, edit the header_php.php file you are currently working with - there should only be one. It's the one where you have $_SESSION['xxxx'] = $xxxx
If there is a variable set somewhere in this page called $error, which is either true or false, you need to follow the same protocol.
If not, then you can use this:
It's not the prettiest way of doing it, and if the customer has entered an entire page of data, and then comes across this type of error they will hate you, as none of their data will be re-populated, but as I don't know where you are adding the details, or what other modules you have installed, it is the only fail-safe way of doing it I can think of.Code:if (!zen_not_null($_POST['my_variable_name'])) { //perform ALL checks on relevancy here $messageStack->add_session($_GET['main_page'], TEXT_ERROR_VARIABLE_MISSING, 'error'); zen_redirect(zen_href_link($_GET['main_page'])); }
Absolute
Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store
Anybody have any idea how I might add a checkbox that will enable users to split the shipment of their product should they desire to do so? I'd have to be able to see it in the orders area of the admin as well. I'm not particularly PHP savvy, in fact, I know just enough to get myself into trouble to be perfectly honest...all I've been able to get done so far is adding a split_shipment field in the orders database...![]()