Jump to content

tomsey12

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tomsey12's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=362933:date=Apr 9 2006, 06:39 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 9 2006, 06:39 AM) [snapback]362933[/snapback][/div][div class=\'quotemain\'][!--quotec--] Remove the single quotes from this line: [code]<?php $wan = $_POST['$album']; ?>[/code] A variable name that is contained withing single quotes is not evaluated, so you end up looking for an entry in the $_POST array with the index of the string '$album', not the value of the variable $album. What you want is:[code]<?php $wan = $_POST[$album]; ?>[/code] BTW, instead of doing [code]<?php $album = str_replace("\n", "", $album); ?>[/code] to remove the newline character at the end of a line, just use the trim() function: [code]<?php $album = trim($album); ?>[/code] Ken [/quote] Still not working :( $wan is still empty, but thats for the trim() help :)
  2. [!--quoteo(post=362881:date=Apr 8 2006, 11:53 PM:name=mistergoomba)--][div class=\'quotetop\']QUOTE(mistergoomba @ Apr 8 2006, 11:53 PM) [snapback]362881[/snapback][/div][div class=\'quotemain\'][!--quotec--] try putting [code]import_request_variables('p');[/code] at the beginning of the script [/quote] Didn't work :( any other ideas?
  3. "albums" is a text file (without ".txt") <? $albums = file(albums); foreach ($albums as $album) {$album = str_replace("\n", "", $album); echo "<input name=\"$album\" type=\"checkbox\" value=\"1\" />"; } ?> this form this script is part of points to the below script <? $albums = file(albums); foreach ($albums as $album) { $album = trim($album); $wan = $_POST[$album]; if ($wan == "1") { $data = "$data\n$wan"; } else {} } ?> It doesn't seem to be able to get the value from the checkbox when its checked (1) using $_POST[$album]; Can anyone help me? Thanks alot!
×
×
  • 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.