The data is not being written to my database. If I remove the mysql_prep() function the data writes just fine but since it is a text field, I really need to use the function. If I write as follows:
mysql_prep is not a standard function. Examples that I've seen take a single string argument and clean this text for inclusion in a sql statement, not an array.
If you have such a function then I suppose you could do:
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Why not use 'array_map' which will feed all your POST/SegmentNotes data into the mysql_prep function, returning an array as the result?
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Yes that would be the best approach. That's what you had suggested originally, right? I wasn't sure about using that approach because i though that the mysql_prep() function would still want a string and would bomb when fed the $_POST['SegmentNotes'] array. I will give it a try, though.
Will feed each of the SegmentNotes elements (strings) into the function mysql_prep() one by one, returning all the results into the new array CleanNotes.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Will feed each of the SegmentNotes elements (strings) into the function mysql_prep() one by one, returning all the results into the new array CleanNotes.
I haven't been able to work on this project for a while but array_map() is exactly what I need. I'll post back when I have it working. Thanks for your help.
I haven't been able to work on this project for a while but array_map() is exactly what I need. I'll post back when I have it working. Thanks for your help.
Kind regards,
Ken
Just got round to doing this lol. It works fine and I just wanted to say thanks.