Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by vbcoach

  1. Thank you ginerjm, I will give that a try. Much appreciated. I inherited this mess. Thanks for your help.
  2. I've dealt with you before. You're very good at accusing - not very good at helping. Why are you still here? Found someone at another site who was very helpful.
  3. Anyone else able to help?
  4. I am reading the replies. You are writing to me code that I am unfamiliar with. When you ask me to place this information in my code to see if it works, that's what I do. If something is missing from your example, it doesn't help me fix the issue, or learn the how and why you did it this way. So very humbly, what is missing here?
  5. Oh, I might add that what I am looking for overall here is that if the team captain select a tshirt at the time of registration, I would like it to be "SELECTED" and displayed here. If the field is blank, then I would like for all the tshirt options be be available to be chosen. Hope that helps?
  6. Hello Psycho, thanks for your very quick response. I know my code is older, but I inherited it. As I try to wrap my head around what you wrote, one thing that was apparent as I entered the code was the HTML portion seems to be mission some type of variable statement. The <select name="size" id="size"> <?php echo ; ?> </select> is not actually echoing anything. What's missing here?
  7. Hello all. I am having an issue displaying data in a form that IF EXISTS (not blank) will cause that option to be selected. The looping itself works. The variable called into the form works. Just can't seem to get the form to SELECT the correct variable. <select name="size" id="size"> <?php while ($lrow = mssqlfetchassoc($tres)) { ?> <option value="<?php echo $lrow['ts_id'];?>"> <?php if($lrow['tsdescription'] == $info['size']) echo 'selected';?> <?php echo "$lrow[tsdescription]";?> </option> <?php } ?> </select> So this is displaying the team captain's TShirt size from a database (mssql). In the database the field is called tsdescription. For sake of argument, let's say the tshirt description is "Blue 2XLarge". This variable exists and is passed into the form for updating by the team captain, if necessary. The loop works, as it loops through all the tshirt options (107 in total) and works as a pull-down menu. Somehow my IF statement doesn't work. What I am looking for is for PHP to "find" the existing tshirt description 'tsdescription' in the loop statement, and if found, cause it to be "Selected". The $info are the variables for the form when the captain's information page is loaded. So far, by itself, the $info['size'] returns the correct tshirt. "by itself" the dropdown works. Thus, something must be amiss in my IF statement. Can anyone help direct me to what I am missing to make this work? Thanks in advance. -J
  • 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.