Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Posts posted by ginerjm

  1. Hard to make sense out of what you want with the incomplete code you provided.

     

    Are you viewing this code in a browser or a text editor? You say 'view source'. Does that mean you are using the browser's 'view source' command? If so, a <br> will not cause a line break (at least not in IE) so if that is the problem, then you have a \n char in the code already.

     

    I'm confused as to your reason for worrying about what the 'view source' gives you for format too. Why does it matter since most people aren't going to see this? Besides - removing the <br> and inserting the \n is going to ruin the html formatting of the page.

  2. You ask:

     

    I would like to setup something ... which will allow me to securely store usernames and passwords for accessing databases and remote servers without needing to have them stored in the file system.

     

    Shouldn't username and passwords be coming from the users? And why would anything be stored in the file system when you have a db? If you want to access a remote server you could store the credentials in a table and let your appl go get it. That s/b pretty secure - especially once the user (?) logs in correctly.

  3. Uhhh, This is a forum where we help you with the code you are trying to write. So - you should take a stab at writing your idea in code and testing it asking for help in perfecting it.

     

    btw

     

    1 - your url should look use ampersands instead of + signs for the second and third parms.

     

    As for the rest of your explanation of what you want to do, I'm a bit confused. Your url provides one value for each parm but you want to get "groups of divs" out of each one? Hmmm...

  4. In addition to Gizmola's advice I suggest that you do NOT store the actual image files (.jpg,.png,.gif, etc.) in a table. No need for that. Store the location/name of the image file in your record and save the image file in that place. If the images are going to be displayed on your html pages, then store them in the web-accessible tree.

     

    As for your paths - if you have control over the images and directory structure I would keep the path to the folder(s) as a constant for your appl and just use a relative path in the record. Then when things get moved around for some reason you simply create a new tree and copy the old one under it and then modify the appl constant to point to the new location. All the relative paths in the records will still work just fine.

  5. Where to start?

     

    1 - post code in the forum properly using the tags as described in the rules.

     

    2 - Learn at least a LITTLE bit about php - specifically that it is case-sensitive. That means that $_post['tracking'] is invalid.

     

    3 - Turn on php error checking in all your scripts during development so that things like #2 show up as the errors that they are.

     

    4 - When writing code put statements on separate lines. Makes reading them much easier as well as editing later on.

     

    Yes - do as Barand suggested but also do try to do some of the things that I just posted before you post more code here. It will greatly help your cause.

  6. if ($handle2 = opendir($dir))

    {

    while (false !== ($entry = readdir($handle)))

    {

    [\php]

     

    You opened $handle2 and tried to read from $handle.

     

    PS - you can write it like this:

     

    while ($entry = readdir($handle2))

     

    instead of the more complicated way you did it.

  7. As in your last post you continue to use non-standard array notation.

     

    The index of an array element if not that of a numeric array needs to be in quotes.

     

    $ar = array();
    $ar[0]= 'first element';
    ar[1]= 'second element';
    echo $ar[0],'<br>';
    echo $ar[1],'<br>';
    

     

    produces and outputs a proper numeric array.

     

    $ar = array();
    $ar['first'] = 'first element';
    $ar['second'] = 'second element';
    echo $ar['first'],'<br>';
    echo $ar['second'],'<br>';
    

     

    produces and outputs an associative array.

     

    If you read up on arrays in the manual you will see references to how PHP tries to interpret what you are writing. Indices that are non numeric and not in quotes will first be checked as a constant which is what the messages are telling you. I don't think that is what you are trying to do.

×
×
  • 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.