pvtpyro Posted August 29, 2006 Share Posted August 29, 2006 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? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted August 29, 2006 Share Posted August 29, 2006 How doesn't it work? Your code snippet looks fine as long as the method in your form is "POST", if it is "GET" or missing you need to use the $_GET array not the $_POST array.Ken Quote Link to comment Share on other sites More sharing options...
pvtpyro Posted August 29, 2006 Author Share Posted August 29, 2006 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. Quote Link to comment Share on other sites More sharing options...
pvtpyro Posted August 29, 2006 Author Share Posted August 29, 2006 Oh wait! I'm sorry. This is the second time today I've corrected my own mistakes.I am sooo sorry for wasting time. I've never done something right on my own before! :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.