Jump to content

MidgardTree

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

MidgardTree's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey- I've got a form that has a dropdown generated from php: <?php echo "$TypesDD" ?> $TypesDD is defined in an included php file from a mySQL db. Pertinent part is: $TypesDD = "<select name=\"TypesDD\" id=\"TypeDD\">"; . . . while($row = mysql_fetch_row($result)) if($lasttype != $row[0]){ $TypesDD .= '<option value='; $TypesDD .= $row[0]; if ($row[0]==$type) $TypesDD .= ' selected'; $TypesDD .= ">" ; $TypesDD .= $row[0]; $TypesDD .= "</option>"; $lasttype = $row[0]; } After the form is submitted, I get it by saying: $type =$_POST["TypesDD"] ; Everything works great...UNTIL there is a two-word (or more, I suppose) item in the list & the post only gets the first word (leaves out the space & everything after it)... I've tried a _wide_ variety of single & double quotes in most every different place (the POST originally had single quotes, which I usually use), escaping, not escaping, nothing seems to work... What am I doing wrong?!? Any help GREATLY appreciated! -Midgard
  2. Hi- Thought this was going to be easy...now, not so much. Suppose I have a form. The user enters some data into a field. Suppose there is a "check syntax" button. The user clicks on it, the field sends the entered data to a php script, which analyzes the data and (should) return a variable that contains "good" or "bad." It might even send back a modified string of the original data with annotated comments saying why it is bad. I want to display the returned value on the same form, preferably under the submitted field: Enter code: [original data] <button: check syntax - calls php script for validation> [display return value from php script with results from check] Could someone please explain exactly how to accomplish this? Many thnx, -Midgard
×
×
  • 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.