Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. 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.
  2. 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>"; } }
  3. 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.
  4. 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>";
  5. 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.
  6. 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.
  7. 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?
  8. 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.
  9. Specify the path in the arguments to the glob call. Read the manual?
  10. And it supports PHP and allows you to modify the .ini file? (Remember - you get what you pay for.)
  11. 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
  12. 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?
  13. 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.
  14. If you look at an html reference you will see that the image tag has a "title" attribute.
  15. You could pass a JSON array of that stuff to the js code in the webpage when your php builds the page. Then it's simply a js function called by an event on the dropdown box.
  16. Initialize it at the start of your function?
  17. The standard html img tag attributes don't work for you?
  18. Hmmm.... Barand gave you back the same url that you referenced which you said you were happy with except for the part concerning retrieving the data into your script. Now you say it doesn't give you what you need. Is it simply a matter of culling a different field from the decoded data? Do a var_dump on the data and see what it contains and use it.
  19. You have to provide a unique value for your options otherwise whatever is clicked will return the same value "first name:". When a select tag is setup properly the $_POST array will return something as $_POST['first_name'] which will match one of the values you specify in one of the option tags. No matter which item is selected currently you will get back "first name:" every time.
  20. I googled (one time) this: zip code location database and got this: http://federalgovernmentzipcodes.us/
  21. Your screenshots were not necessary. I understand exactly that and that is what I described in my post. As Barand also said, your anchor is wholly controlled by what you write out with you php script and your editing is done using a form and input field and a submit button as he wrote. What else do you need?
  22. An anchor is an html tag. That's all. So - like all html produced by a php script - you just output the anchor's contents to your page along with whatever else you want. I hope this is what you were asking because if it's anything else you didn't make it clear to me. Editing db contents using forms is one of the most basic web tasks there is. Your script begins by getting some input that identifies the record you want to update. The script takes that input (record 'key') and reads the db and then writes out the html needed to contain the form wherein you place your fields (input tags) containing the current values from the db. Now the user makes their changes and clicks a submit/edit/save changes/ etc. button. Your script gets the $_POST data from this webpage and form and handles it by validating it, ensuring that the changed data fits your db constraints (ie, a date field must contain a valid date, numeric input fields should contain only numeric values, etc.) and then prepares and executes an update query. Lastly it sends back a response to the client/user indicating that the update was successful, or it sends back the same page/form with error messages. Again - I hope this is what you were seeking. I'm surprised that you couldn't find this kind of answer in whatever research you may have already done, so I'm a little concerned that I may not understand what you are asking.
  23. One minor correction - a hanging 'and' - and it works as desired. Thank you.
  24. Actually, no you didn't. And your question merely asked how to echo something. Not knowing that you are apparently restricted in your programming options by your framework - tsk, tsk - I offered what I could.
  25. You are using a class here that you don't show us the details of so we can't tell you what you can do. If all you really want to do is echo a message then simply echo it. No need for a class for that. If you are just a beginner in learning PHP, how did you write a class like this already?
×
×
  • 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.