Re: Please help..



Frank van Meurs wrote:
Rik wrote:
fjm67 wrote:
[SNIP...]
if(isset($_POST['submit'])){
foreach($_POST['text'] as $id => $text){
mysql_query("UPDATE tbl_name SET `text` = '{$text}' WHERE
`id` = $id");
}
}
[SNIP...]

I'm probably missing out on somthing here, but why would one want to
do this? Surely you don't want to update rows depending on user input,
especially when the possible input was based on the data you provided
yourself in the first place?

Euhm, firstly, how do you propose changing a value in a database that needs
to be changed by a user and a webinterface? I'd say by providing them with a
form with a possible input and update the field after a post....

Second, let's quote myself:
"Simpified code, without error checking and hence a major security risk
<snip>
If you have purchased some books I assums they will tell you what to do
about safety..."

I could keep posting fully operational forms with vigurous user- and
datavalidation, but that's normally not the answer to the question. And
allthough I'm posting a lot these days, I DO have something better to do
then providing fully operational code for free :-) (No really, I have a
live, please believe me..).

Grtz,
--
Rik Wasmus


.



Relevant Pages

  • Re: Please help..
    ... I'm probably missing out on somthing here, but why would one want to do this? ... Surely you don't want to update rows depending on user input, especially when the possible input was based on the data you provided yourself in the first place? ...
    (comp.lang.php)
  • Re: Question from newbie
    ... > I'm still in learning Ada. ... there were something missing in ... > coding. ... > now doing a program that ask user input x characters and program will ...
    (comp.lang.ada)
  • Re: How to insert variable into link path?
    ... Is there an easier or more elegant way to insert this variable folder into the link path other than CONCATENATE? ... I have several options on how to get user to enter the project number, but am missing that final step of getting user's input into the path link. ... obtain the user input with a form control or input box and build up the path string via concatenation. ...
    (microsoft.public.excel.programming)
  • Re: Poker Stars.. for those complaining that its rigged
    ... I think PokerStars is missing a few zeros... ... We use 249 random bits from both entropy sources (user input and ...
    (rec.gambling.poker)
  • Re: VB 6 debugging on Vista
    ... respond until all code is done running and it is waiting on user input. ... Unless I'm missing something, again, that's sounds like normal behavior. ...
    (microsoft.public.vb.general.discussion)