Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. You didn't tell me how you were getting the data. I just told you how to handle the data you showed me. It's up to you to parse the input file and get it into the format you presented first. Or figure out your own method.
  2. A little knowledge could be bad. Do you not understand php code yet? Assuming the answer is yes, then why do you want to know? The code, with an obvious flaw in it, attempts to take an uploaded user file and append a userid to the front and then save the uploaded file to a new place with that new name. Problem is that it appends an extra extension to it. Does this help?
  3. If what you are saying (and this is a guess since you aren't very clear) is that the 4 lines above represent key=value pairs, simply explode each line on the = sign and then add the 2 array elements to an array as in : list($k,$v) = explode("=",$line); $arr[$k] = $v; Of course this will have to go into some kind of loop to collect all the data (4 lines). Now you can simply interrogate the array for the value you want: $val = $arr['PCODE[p45]'];
  4. If you want something added but separate, why not just add a function call that passes the necessary args to the function? Then design the function anyway you want.
  5. I fail to see why one would need to consider "script design" changes just because one switches from procedural to oo. If one is already managing to keep business logic physically separated from the presentation logic, how does the change in tools affect this?
  6. Still practicing deceit in your posts because you make mistakes constantly. You'll never be a true programmer that way.
  7. Not my problem.
  8. By the time your process reaches 'page load' the server is out of the picture. And if this is all about sending un-suspecting users to an ad with your links instead of where they think they are going - Shame!
  9. Do you get the thank you for feedback message? Turn on php error checking - might have an error. What is the anchor tag with the onclick event supposed to do for you that a simple submit button doesn't do?
  10. If you gave us the scripts that you actually run we would still be willing to help. You just can't mislead us. You have to realize we are trying to help but we are blind here if we can't see your code - good or bad. Help us to help you by providing the MEANINGFUL code that RELATES to your problem next time.
  11. Sure sounds like you want someone to write this for you. If you are attempting to learn php or even learn how to program, you have to do the learning yourself. There is a certain amount of intelligence that has to be used to do this kind of work, and that use begins in the beginning. Good luck. You may get some well-meaning reader here who will jump right in and solve this problem for you, but I feel that would be a serious injustice to your learning process. Besides - why are even attempting this exercise? Did you dream this up? If so, why did you start with such a tricky project? Try something simpler to get comfortable with writing simple php and solving simple problems. Or is this actually 'homework'?
  12. Are you just saying that you want the user to be able to filter what data shows up on the page? For ex. you do a query and show him 10 records. Then he clicks on a couple of rows on the screen because he didn't want them and you have to re-build the page leaving those two off? Simply do as Frank said - change your query to exclude those two records by their key value and re-run the query.
  13. Is this link on the page at all times? Meaning - when they click the link and it goes to url 1, does the link still show up on wherever url1 is? Or do they end up somewhere else and you want to remember where they went so that if and when they use this starting page again, you can direct them to url2 the second time?
  14. And just to be the demagogue in the group - there are no php tables. They are html tables. Semantics count in programming.
  15. Excuse me? You re-posted the same broken code DELIBERATELY when I asked you for specific code to help you out? Good by. Not wasting my time on you.
  16. Seems like I've seen this code somewhere before. If this is THE ACTUAL CODE YOU RAN you should be getting an error because you misspelled your description. I don't think this is the code you ran
  17. In one spot you do a query that selects only 'emailaddr' from your table. Then later you try and reference a field named 'id'. How can that happen?
  18. What do you mean by 'doesn't work'? There's nothing wrong with the statements, altho the else echo seems odd with those closing html tags embedded. do you have error checking turned on?
  19. Post (Properly please!) the code that is the form and then the code that processes the form values and creates the query to insert them. Be sure that you show the part where you turn on php error checking.
  20. Why don't you test them before you start manipulating them? Actually - they will be "set" when you assign those POST vars to them, or else you would get an error/notice that the post vars are not set. So what you really want to test is the POST vars for being set and for being <> blank
  21. To elaborate on Barand's offering: In your loop you need to build an html table row only once for every 3 times thru the loop. So you conduct the test he gave you and if it equals zero, you output the start row tag (after first checking if you have a row already started) and then output the td tag with that occurrence of data. Then you increment the rowcount var and loop again. This time the test will fail, so you only output the td tag. Play with it and you'll figure out the little things as you do
  22. Part of being a good programmer is learning how to test your own code. I doubt that you are writing such a complex script at this stage that you really need to automate your testing process. Simply look at your code and analyze how many paths it can take and try and use your script in ways that will test all those paths and be sure your script is handling them properly.
  23. So - since you aren't showing us the messages, did you fix all the errors? Be sure to check the resuls of your query call and output the MySQL_error code if there is one.
  24. Because you tested for a match instead of a break first. Follow my example (with the additional output at the end that was pointed out) And WHY DID you double post this problem?
  25. Are you getting any errors? (ie, do you have php error checking on?)
×
×
  • 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.