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
https://forums.phpfreaks.com/topic/26005-checkbox-funny-going-ons/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.