Jump to content

martyng

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

martyng's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a managed Apache server, I wish to allow my clients FTP access to a folder, but WRITE ONLY, is this possible? (so many can upload files, I don't want to have to set up individual ftp accounts)
  2. Still couldn't figure it out, but got around it by checking value of $picture and using two different statements with a fixed gallery1 or gallery2 I'd still love to know how to do it properly tho as my way is messy and only good as I only have two variable choices 1 or 2
  3. Nearly there, this doesn't produce an error but doesn't add the information contained in gallery$picture looking at the source code the image is just pictures/ with nothing tagged on Any ideas [!--quoteo(post=380530:date=Jun 6 2006, 03:57 AM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 6 2006, 03:57 AM) [snapback]380530[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code] "<a href=\"profile.php?id={$row['id']}\"><img src=\"pictures/{$row['gallery$picture']}\" width=\"132\" height=\"175\" border=\"0\"></a>"; [/code] [/quote]
  4. Still no luck, gallery1 refers to a row in a table. I also have a row called gallery2 and to create a random galery I have the random variable $picture with a value of either 1 or 2. The code works fine with a fixed [gallery1] or [gallery2] but not by trying to replace the 1 with $picture. KrisNz's post looks closest to what i'm trying to do but still doesn't work giving the following Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Any ideas guys
  5. Sorry, unclear, i Need to replace the 1 in gallery1 with the variable $picture ie. like $row[gallery$picture] but this doesn't work
  6. I read a recordset into an array and one part is shown below. I need to replace the numeral 1 with the variable picture, which i tried to do by just replacing 1 with $picture but can't get it work, any ideas "link"=>"<A HREF=\"profile.php?id=$row[id]\"><IMG SRC=\"pictures/$row[gallery1]\" WIDTH=\"132\" HEIGHT=\"175\" BORDER=\"0\"></A>",
  7. [!--quoteo(post=351470:date=Mar 3 2006, 07:48 PM:name=michaellunsford)--][div class=\'quotetop\']QUOTE(michaellunsford @ Mar 3 2006, 07:48 PM) [snapback]351470[/snapback][/div][div class=\'quotemain\'][!--quotec--] to append use the period in front of your equal sign. $id = "55"; $id = "1"; // $id value is "1"; $var = "2"; $id.=$var; // $id value is "12" -- retaining the "1" from previous code, and appending the "2". let me know if this is not what you're looking for. [/quote] How would this relate to my array? i guess i need a , in there also as a seperator
  8. Hi I'm trying to write a url id to an array then write this to a cookie, appending it to any previous entries. I'm struggling as i seem to just be storing one id and overwriting. Please help <?php // get id from url $setid = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['setid'] : addslashes($HTTP_GET_VARS['setid']); if($_COOKIE["feature"]) { // Convert the string back into an array. $content = unserialize(stripslashes($_COOKIE["feature"])); $content[] = $setid; } else { $content[] = $setid; } // write content to cookie as a string setcookie("feature", addslashes(serialize($content)), time()+60*60*24*7); $URL="./lightbox.php";header ("Location: $URL"); ?>
  9. Hi I'm trying to have an array to maintain the id's of some favourite items, like a shopping cart but no that complicated. I can't get it to add to the array tho, can anyone help? <?php // get id from url if (isset($HTTP_GET_VARS['setid'])) { $setid = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['setid'] : addslashes($HTTP_GET_VARS['setid']); } // check if cookie set and if so add new setid on the end if(isset($feature)) { echo $featureid; $featureid = $featureid .= ','.$setid; } else { // cookie not set yet // only one entry so add as is $featureid = $setid; } setcookie("feature", $featureid, time()+604800); /* Expires in a week */ $URL="./lightbox.php";header ("Location: $URL"); ?>
  10. Hi I don't have the code i made and tried with me as i'm on my works computer at the moment, but i'm trying to read the contents of a directory, and identify subdirectories of it, then list these subdirectories in a drop down list on a form the user submits. Currently I do this by the user tapping in the subdirectory name but i feel this leaves too much room for error. Can anybody give me a hint? or a link to something similar, assuming: $mydir = "/home/users/d/myfolder/" Thanks
×
×
  • 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.