Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Or you could post on the forum that caters to paid services, not here.
  2. People are trying to help you program like a professional and you're wise-cracking? Say good-bye.
  3. The use of $_REQUEST is not recommended. It is far safer and better to use what you actually expect your data to arrive in. If the form uses method='POST', then use $_POST. Same if it is a GET request. Use $_GET. Hackers could do something with a get while your script expects a POST and by using $_REQUEST they can still get into your script. Why use the ambivalent $_REQUEST when you know what it should be? If English is your primary language, why do you write such poorly composed posts?
  4. Like mac_gyver says - learn what you are copying before you try to use it. If you "find" some piece of code, look up every part of it in the manual to see what it is doing and to LEARN from it. Can I ask: Is English not your primary language?
  5. In one way it is rather deficient. It is recommended to NOT use $_REQUEST as a catchall/shortcut for accessing your expected input. If you are expecting $_GET input then USE it to get it. Same for POSTs - if it is supposed to be coming in via the $_POST array, then reference the $_POST array. One less way for a hacker to get the best of you
  6. Do you not even know how to write plain text to communicate? Of your last 4 posts above this one, the first 3 make no sense at all! And the latest one is fraught with errors even while trying to teach something. Are you trying to tell the Forum about the dangers of trusting user input? I think most people here already know that and try to impart that to those that don't. PLEASE try and learn this: Do Not Use $_post. It is not what you think it is! One of the first things about PHP that you will learn if you ever really try to learn it is that the language is CASE-SENSITIVE.
  7. There was an extra ( in my sample code. If you had turned on php error checking you probably would have been informed of it.
  8. Dom is great if you are using JS to modify the current page in real-time. But from a PHP script that is literally building a webpage, there is no need to do things the hard way. Just echo out the html you need.
  9. Wherever you think you created $results you need to check. Probably your query failed and you didn't check it first.
  10. Well the anchor tags are the natural way to do it. How else are you going to generate a click? As for your concern about resource usage - a simple glob will tell you what the contents of a dir are and how many entries there are so what is the concern? As for the 'complex structure' you are only going to load one dir for a click - any dirs below that one will still show up as anchor tags with no details beneath them - yet.
  11. Checking if $_POST is empty is a pretty meaningless check. What are you hoping it will tell you? Upon receiving posted input one usually checks for the button value that was checked and then proceeds to handle the input data that that button should be providing. You're checking if there is anything at all in $_POST and then immediately proceeding to use the input provided without checking if all (or any) of the inputs are valid or even present. As for your first statement that Cronix disputed - it seems correct to me. You ask if 'active' is NOT 1 and if 'active' is NOT 0 and if true you prepare an error message. Seems valid to me!
  12. Is there some reason behind using dom to build your page instead of just echo'ing the html you need to display this? And why does it have to be ajax? As for the clickable things - output your list elements as simple text values but when one of them is a directory name output it as an anchor tag inside of a list element.
  13. As mentioned before - you REALLY need to read something to learn about PHP. Your last code sample is still a MESS. Two opening form tags, but only one closing one that I can see. You've invested an awful lot of time in layout but very little in designing the simple mechanics of html and form input handling. 1 - Turn on php error checking. It will help you. (See my signature) 2 - Hint - there is no such variable as $_post. A little bit of php knowledge will teach you that. 3 - Proper array syntax is $variable['index'] which you are not doing. 4 - You are doing a form POST so why the use of (incorrect) $_get references? If my question puzzle you and make you think that I'm being unfair, consider it your first lesson in how to learn to program. You think this is easy? It CAN be -if you do your homework.
  14. Untested but s/b pretty close. $site= (dns_get_record( "example.com", DNS_ALL); ShowArray($site); //*********************** function ShowArray($arg) { foreach ($arg as $idx=>$val) { if (is_array($var)) { echo "<br>Array is<br>"; ShowArray($var); } else echo "$idx is $val<br>"; } }
  15. Did you fix the problems I pointed out? When you do how about isolating the new problem area(s) and posting those snippets of code for us to address? I, for one, will not be going to your external post no matter where it is hosted, so I won't be any help until you do the necessary work to get close to your problem and ask a pertinent question.
  16. echo "<textarea name='txtbox' cols=60 row=9>",print_r($array,true),"</textarea>"; OR do you mean simply to display it as text? echo "<p>",print_r($array,true),"</p>";
  17. 1 - you are using $_POST in your code but since your form doesn't have a method set the $_POST array won't have your inputs 2 - You also reference an input name of 'submit' but I don't see that in your form 3 - I don't see where you included the class so that could certainly explain your new error now as well as the above two items. 4 - add php error checking to help you debug what will probably be many future errors. See my signature.
  18. Look at those lines. You are referencing an element of an array that does not exist. That you must figure out yourself. YOu could do a var_dump before trying to use any of that array to see what indices you DO have in there.
  19. Perhaps you could point out the line that is giving you the error message since line 99 in your post is blank. No need to get indignant - you were simply asked for a more complete details to help solve your dilemma. PS - if you removed all the uses of session_register, what did you replace them with? Perhaps you could post your revised code - specifically the area where you are having the problem?
  20. Reading is a real talent. Here's what one would read as soon as they referenced the manual: glob — Find pathnames matching a pattern Description array glob ( string $pattern [, int $flags = 0 ] ) The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells. Also - if you scrolled down thru the examples you would find #6 from Alan.... that describes a pretty nifty function he wrote to do what you are possibly looking to do. No charge for the research.
  21. Specify the path in the arguments to the glob call. Read the manual?
  22. And it supports PHP and allows you to modify the .ini file? (Remember - you get what you pay for.)
  23. That is for you to find out. And once you do, start writing the code to do what you want to do. And then when you have a problem the forum is here to help you out - if you can't get help from the 'magic' people or the 'orchard' people
  24. And this "orchard content management system" - you have the api for it and you have read up on how to use it, so that you can write your php code to do your thing?
  25. Your question is confusing. If you are using the same server for the same user? As opposed to what? And why do you care how the session is managed? Php will handle it for you unless you have written something to replace standard session handling.
×
×
  • 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.