Jump to content

ValkR

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by ValkR

  1. Thank you all very much for your help. I tried all codes provided and they all do the thing I need. I'm very new to PHP so thanks for your support!
  2. Get basic acknowledgement that the code works. I see, what would I have to use?
  3. I had this code working, then I became curious and tried something else and it failed. I then I went to use the original code that worked but forgot it. Whats wrong with this code? <?php $A=(echo '2); if ($_POST['number'] == '1') {include $A;} ?>
  4. Never mind, there was nothing wrong with the code. It was another problem. The code works. I don't know about your code because actually never ran. The product page with all the different categories like A B C D... well, each category was hyperlinking to A, It took me 30 hours to notice that. I am really dissapointed in myself, well, not really. This is my first few days of PHP, I was just so focussed on it, forgot I can still make mistakes in HTML. Thanks for your help mate, your help has not gone in vein, believe me! You are right about the whole point of database, but I do like my setup better and even if I didn't I would stick with it because I don't have time to learn one.
  5. LOL mate, no one has said anything!! Doesn't the "." infront of the directory state 'from this directory!"? If so, A and B would be a parent directory, so PHP shouldn't even know they exist as the code be executed from within. You do mate and I see what your doing. Very very very smart!... but it didn't work. To brief you a little what I am doing.. I am starting an online store website. A = product category 1 = product *.listing is a listing file I have made - index.listing. When one visits the product category page, I want it to show all the products, so I have include() all the all the listing files, so it builds a list of available products. The .listing files are just a few lines of HTML - an image and some text with a hyperlink to the products own page, which would be /A/1/index.html. This ways awesome because it means everything related to the product is in a single directory. I don't like central databases like would be found in MySQL. What this means is all I have to do is drag and drop a directory in or out of the A directory. Eventually I am going to make a payment system... Once payment is confirmed, a little script will run that simply moves the product directory outside my www directory, such as to a directory called /sold. Lets say a customer returns the item, all I have to do is move the product directory back into my WWW directory in the relative product category folder and there you have it. Pretty awesome hey! I still face the problem of getting this listing system working though. :S
  6. I've got: In index.html, I've got the following PHP code: As you can see, what PHP code does is include()'s all the index.listing files. I then create a clone of the A directory and alter the HTML in the .listing files so can tell the difference between A & B when they render: The issue I am having is "/B/index.html" is ()including the .listing files from the /A/*/ directory, when it should be including them from the /B/*/ directory. I can't understand why this is happening and hoping someone could shed some light on the issue?
×
×
  • 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.