acidking
-
Posts
8 -
Joined
-
Last visited
Posts posted by acidking
-
-
Sad, very sad.
I didn't assume 'expert' around here were going to google something up for me, but thanks now I know who I am dealing with.
-
Where did I ask for their 'opinion'? Are you hallucinating? or perhaps you're in the wrong post? In the post we're in now I asked how to specifically implode values of checkboxes. Yes I used google, I didn't particularly find how to implode values of checkboxes.
Eventually my final code turned out to look slightly different:
if (isset($_POST['box'])) { $checkbox = mysql_real_escape_string(implode(", ", $_POST['box'])); }
This is proof to you that I am learning and all I needed was pointers, so you can go and *#$% yourself you're full of *&*%#.
My first post was polite, it didn't work, my second post was polite, nothing came out of it, seems there's a method for getting around on here.
-
This forum is not for giving you answers, it is to help you to find your errors on your own so you may learn to debug your own code in the future. If you want straight forward answers, there is a freelancer section.
I don't need a freelancer, I am trying to learn, the books don't exactly cover each possibility you can do with php.
Dude, take the language down a notch. If you don't like the answers you get, leave. Don't be a whiny child.
How about; if you don't have the answers, f*** off.
Look, it is literally this simple
$query="INSERT INTO boxesTable (boxes) VALUES ('" . implode("','", $_POST['box']) . "')";
No foreach needed.
Thank you kindly! Though I am not sure I'll be asking question here again because clearly no one has the answers, and the community proved unreliable and unsupportive.
I am not working on a serious project, I have a small project I am experimenting with in order to learn, so it doesn't matter whether it's the ideal way or not, I just need to know how such things are done, but why do I have to explain this on length? Makes no sense.
-
this is it, this is the bull$hit .. people trying to influence your decisions rather than just give you a straight answer and let you on your way, but oh no way, they must hold onto you.
-
The data is not meant to be used. And what is it to you how do I want to use the data? Would you like to be my project manager? If it's really that simple I would've got an answer by now instead of bull$hit.
-
I perfectly understand that, and I find myself having to explain this to everyone, but the purpose and use of this particular table doesn't require multiple columns for the checkboxes. In any case, please do ignore what the ideal way is and let me know if you have an answer for the above.
-
Hi all, this my first post.
I'd like to insert values of checkboxes as a string using a comma as a delimiter.
So I have these checkboxes:
<input type="checkbox" class="checkbox" name="box[]" value="1">One</input> <input type="checkbox" class="checkbox" name="box[]" value="2">Two</input> <input type="checkbox" class="checkbox" name="box[]" value="3">Three</input>
Then I'd have a code like this, which is obviously wrong hence I wrote it for illustration only, it should also have an explode function for the delimiter:
if (isset($_POST['box'])) { $newbox = array(); foreach($_POST['box'] as $boxArr){ array_push($newbox, $boxArr); } $query="INSERT INTO boxesTable (boxes) VALUES ('$newbox')"; }
Any help would be much appreciated.
Insert Checkbox Values Into Table As Delimited String
in PHP Coding Help
Posted
ok seriously, I am unsubscribing from this.
Thanks zane.