Jump to content

forms and arrays?


pvtpyro

Recommended Posts

I'm having a little trouble. I will start by showing what I have done.

i have an html form. here's part of it:
[code]    <select name="bgcolor">
      <option value="000000">Black</option>
      <option value="FFFFFF">White</option>
      <option value="CCCCCC">Gray</option>
    </select>[/code]

the forms action is to a php file. this code works just peachy.
[code]ImageFill($image, 0, 0, fromhex('ff0099'));[/code]

i would like to insert bgcolor from my form in place of ff0099 in the php part. But the only method I know doesn't work.
[code]ImageFill($image, 0, 0, fromhex($_POST['bgcolor']));[/code]

can someone help me with this?
Link to comment
Share on other sites

Yeah, I'm using POST.
I'm using the same method for my other form elements, and they all work fine.
it seems that because there's content before and after my $_POST['bgcolor'] that it's not working. I've tried single quotes, double quotes. nothings working.
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.