Ask a Question related to PHP Development, Design and Development.
-
R.G. Vervoort #1
adding list items to a database
Not sure if this is javascript or php so i put it in both newsgroups, sorry
if it's the wrong group.
I wrote (with help) a code to put several items in a list object (select)
and I would like to add the items in this list to a database.
I know how to add a selected item to the database but how can i put al the
items tot the database. I need somekind of loop wich go's through the list.
Any suggestions
roy
R.G. Vervoort Guest
-
How to delete items NOT in a list
I have a table with current movie titles identified by ID number and another table with reviews of those items, also containing the ID number. The... -
JavaScript: html list items within list items?
Hi, I've seen how to implement a JavaScript to change the CSS class of every other list item in an unordered list, but, being new to JavaScript,... -
Adding items to a cfgrid
Hi! I'm trying to add items to a cfgrid using form elements. E.g. I have fname textfield, lname textfield, market comboBox, etc in my form I want... -
adding items to a list or menu
Not sure if it is a php question but since i am working in php here it is. Ho can i add items to (the item label=visual text and the value=index... -
Adding Attributes to RadioButtonList Items?
I am trying to use a RadioButtonList bound to a custom datasource to acomplish some user functionality. I want to add various... -
Reply Via Newsgroup #2
Re: adding list items to a database
R.G. Vervoort wrote:
Its a PHP issue... javascript will only make changes to the client (web> Not sure if this is javascript or php so i put it in both newsgroups, sorry
> if it's the wrong group.
>
> I wrote (with help) a code to put several items in a list object (select)
> and I would like to add the items in this list to a database.
>
> I know how to add a selected item to the database but how can i put al the
> items tot the database. I need somekind of loop wich go's through the list.
>
> Any suggestions
>
>
> roy
>
>
browser) whereas PHP is server based.
Your form has its contents written to $_POST so you can loop through its
contents with
<?
foreach($_POST as $key=>$value)
{ print("<br>$key = $value"); }
?>
You should ensure your data is clean before writing to the database - if
you don't you risk someone putting data in to the form that could give
them access to removing one or more files from your system by simply
having data input using hooks (`) or backslashes.
Download and view the php guide from php.net - I use it all the time and
its pretty good both as a function reference and it has some examples.
I suggest you buy a good book (I have Core PHP by Leon Atkinson for PHP
4 and more recently version 5 and its excellent) and also keep a close
eye on comp.lang.php as there is good help there.
regards
randelld
Reply Via Newsgroup Guest



Reply With Quote

