Jump to content

geldd001

Members
  • Posts

    6
  • Joined

  • Last visited

geldd001's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Form: </tr> <tr class="rsform-block rsform-block-valuta"> <td>Valuta (*)</td> <td><select name="form[Valuta][]" id="Valuta" class="rsform-select-box" ><option value="Eur">Eur</option><option value="USD">USD</option><option value="GBP">GBP</option><option value="CZK">CZK</option><option value="DKK">DKK</option><option value="SEK">SEK</option><option value="NOK">NOK</option><option value="CHF">CHF</option></select><div class="formClr"></div><span id="component2153" class="formNoError">Invalid Input</span></td> <td></td> </tr> And Script: $DataFile = "data.txt"; $valuta = $_POST['form']['Valuta']; $fp = fopen($DataFile, 'w') or die('Could not open file!'); fwrite($fp, "$valuta") or die('Could not write to file'); fclose($fp); Other values are displayed correctly but I won't succeed in displaying the choosen option value.
  2. 1. I don't receive an error 2 The result when i am using Echo is "Array"
  3. Hello, I wrote a small exportscript for data. One of the values I have to export is called valuta. The export will result in an export of only the value: array. It is a dropdown menu with predevined values. In the export I need the value. My script: $DataFile = "data.txt"; $valuta = $_POST['form']['Valuta']; $fp = fopen($DataFile, 'w') or die('Could not open file!'); fwrite($fp, "$valuta") or die('Could not write to file'); fclose($fp); Probable an easy one for someone not being a newbee with PHP? Thanx in advance
  4. Solved! I tried that first but probably I made a mistake somewhere: Changed: $data1 = "".$text1.",".$text2.",".$text3.PHP_EOL; $data2 = "".$text4.",".$text5.",".$text6; In: $data1 = "".$text1.";".$text2.";".$text3.PHP_EOL; $data2 = "".$text4.";".$text5.";".$text6; Thanks for support
  5. Yes I tried. As I mentioned I am a newbie and no guru. One off the value has a vlaue with a comma in it. This is not in my sample. If you just change all the , for a ; than it ends up with more data fields. If the solution is that simple. Please tell.
  6. Hello, As en newbie in php i am looking to a solution for the creation of an output file with semicolon seperations in it. comma delimitied is no option because the file contains values with a comma. $myFile = "data.txt"; $data1 = "".$text1.",".$text2.",".$text3.PHP_EOL; $data2 = "".$text4.",".$text5.",".$text6; $fp = fopen($myFile, 'w') or die('Could not open file!'); fwrite($fp, "$data1"."$data2") or die('Could not write to file'); fclose($fp); The result is: test1,test2,test3 test4,test5,test6 I Would like to have: test1;test2;test3 test4;test5;test6 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.