Jump to content

Checkbox funny going ons


Kelset

Recommended Posts

Hello all!

Ok I have an a form the passes a bunch of checkboxes.

E.G. <INPUT TYPE='checkbox' NAME='five[]' value=".$image[$i]."'>

This give me the result I want when I look at the code in the page, example would be.

<INPUT TYPE='checkbox' NAME='eight[]' value=wedding106.jpg'>

Ok I have some checkboxes name five[] as well and I load them into a multi array and jam that into a session.
The problem is it seems to be adding a "\" at the end of the value. Does anybody know why this is doing that
and maybe  how I can fix it?

Not sure if I explained this right, I'm very tired :( hehe.. Let's say I'm using a normal array so when I submit the form
$_POST['eight'] will receive all the values of those checkboxes. So it should look like this

array('wedding106.jpg')

but I'm getting

array('wedding106.jpg\')

Not sure where the "\" is coming from.

Thanks for helping me in this matter :)

Stephen
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.