Jump to content

Kindot

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Kindot

  1. It's part of a bigger script, and as I said I am not an expert, I am just implementing something to that. However, I just tried what you said and it works finally! I completely ignored the existence of that flag, and it was the key, I think because the file has at the end an empty line. Isn't so? About quotes I wasn't able to traduce "quoted" in my language (in italian it becomes an unusual word, and google translate doesn't help), that's why I didn't understand, or you know it or you don't know it. But anyway it needed that flag too. Thanks again! I think I will come back here to ask you something else
  2. Thanks for the reply, unfortunately I'm not an expert and it's my first website. It will be accessible only to a few people so I hope it will be good. However sorry but I didn't understand what did you mean. The option value works because if I select an option the page shows me what i selected, just it doesn't select the option as "selected". Can you please explain to me what you wrote? Any example would be welcome.
  3. Who tells me what's wrong takes a kiss if( isset($_POST['anno']) ){ echo "<select name='squadra'>"; $squadraseltutte = ""; if ($_POST['squadra'] == "tutte") $squadraseltutte = "selected"; echo "<option value='tutte' ".$squadraseltutte.">Tutte</option>"; $squadre=file('./statistiche/archivio/'.$_POST['anno'].'/squadre.txt'); for ($num5=0; $num5<=19; $num5++){ $squadrasel = ""; if ($_POST['squadra'] == $squadre[$num5]) $squadrasel = "selected"; echo "<option value=".$squadre[$num5]." ".$squadrasel.">".ucfirst(strtolower($squadre[$num5]))."</option>"; }; echo "</select>"; } else echo "<select name='squadra'><option value='tutte' selected>Tutte</option></select>"; It should select the $squadre[$num5] chosen with the $_POST['squadra'] automatically but it selects always the first option anyway. If I choose "Tutte" it works, it selects "Tutte" automatically. What's wrong within the for cicle? Sorry for the bad english and thanks in advance!
×
×
  • 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.