Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Didn't you get advised on another post of this problem that to lock out the legitimate user for 48 hours would be a serious issue?
  2. You say you're using post yet you are constructing the url like a get - and a get is going to have that extra & in it, thus messing the whole thing up.
  3. He's using mysqli but slipped in a MySQL_read_escape_string function. Plus he has a bad query. See other forum site.
  4. I believe this article explains why it happens. Don't know how to remedy it tho. I'm sure someone (Jacques1?) will be along shortly. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/Sending_and_retrieving_form_data
  5. Are you using a GET to submit your data?
  6. For a person who is not sure how to use sessions, why do you feel the need to set a path for them? What's wrong with the default handling designed in by the PHP authors?
  7. The execute should come first. You have nothing to 'get' until you run it.
  8. Also - re-read your code. You escape a couple of fields and then hash the un-escaped one. You also go to the trouble of grabbing the post values before you check to even see if there are any values. Kinda backwards, no? Also - try to add some error checking on your actions. Check the connection results. Check the prepare result. Then do your query. IMHO - something doesn't seem right here. I've not used mysqli (PDO) but as I read the manual this is the order of things: build query prepare query stmt bind params to stmt execute the stmt get_result loop thru the results obtained from get_result using fetch_array/fetch_assoc You do the get_result before the execute AND you don't assign the get_result to anything. Read the manual and see if you agree with my impression.
  9. // in php mode here "<li class='Answer$QID-$Value' id='$QID'><a href=# id='somecriteria' onclick='getAnswer()'>$QA</a></li>"; This is untested. The class in the li may be what you want to put into the id of the <a>. Your onclick event will call the js code that will extract the question and answer values from this.
  10. You could still use my idea about anchor tags to tell the user to 'click the best answer'. JS attached to anchor tags. Each anchor tag having an id perhaps that holds the Q# and the answer code/value that your js then retrieves and breaks down
  11. None of your code samples make sense, nor your supposed working code. Whatever do you mean by "I have been successful in getting the output in a pure php file"? What is a pure php file? A file that has nothing but php code in it and no html? And how do you know this thing works?
  12. You talk about ceasing the usage of radio buttons to make selections but then you talk about (and show) a list item. How do you expect to get the user to recognize that a list element is a 'selection' and how do you expect to retain that knowledge? Or do you want the javascript to be triggered when focus (?) is obtained on each list item and do something then? Me? I would use css-styled anchor tags inside the list items with no href attribute and just a js call attached to an event on the anchor. But you would also have to have some indicator to show what the user has already selected, no? And how about removing the selection when the user changes his/her mind? Personally radio buttons make much more sense to the user.
  13. As suggested, read the manual on using the mail() function. YOu are missing the headers.
  14. Perhaps you want to pose these questions to Ebay tech support to see what they changed.
  15. You have a table to store users who sign up to become referrers. When you decide that they have reached a certain level you post that value to their "referrer" record. And so on. I assume that you rate them at a certain level for all people that they refer or for all products that they can be referring. If not, you have to create a referrer record for each user for each category (not level) of referral they make in the same fashion. Obviously the referrers must login before referring someone. Periodically you go through your table (monthly?) and look for referrals made since the last-paid date on the record and report out (or store) the referrer's name/id and the amount to be paid this time and post that record with the current date as the last-paid date. You might also save the total amount earned over time. Am I close? Does this make sense?
  16. At the least you need a space after WHERE
  17. Not in this forum. See other ones.
  18. Error text? Is this an error message from your script or is it perhaps an error message from PHP? Show us the message.
  19. The way to avoid a problem with headers is to practice good code organization in your scripts. Do your output from one place, after you have processed thru all your logic. That way if your logic wants to send you somewhere else it can do so, since you will not have output anything at that point. Fix those errors!
  20. Do you have php error checking enabled to be sure your script is free of errors? As for testing the result of the mail call - I find that it pretty much always comes back true even if the mail is never sent. As for the headers showing up in the message - you probably did not format the mail call correctly. Try building the message body from all those parts outside of the call and then just pass in 4 vars to the call: $to, $subject, $msg, $hdrs.
  21. You admit that you know nothing about coding and yet you have done something that is supposed to satisfy CLIENTS already? Rather bold of you! Would you take your car to a self-proclaimed auto mechanic who tells you that it is his first day trying to fix cars? Or a would you go to a doctor who is in his first day of med school? What do you think learning how to program computers is all about?
  22. As I read the manual for this function I sense that it doesn't work on multi-dimensional arrays. Why you get a consistent order while trying to do so I do not know, but I think you have to use a custom sorting function. See remarks for assort in the manual.
  23. Not sure what your code sample is telling me but here is how I would do it, if I had to: - you have a login/user table that holds the user id and the encrypted password. - add to this a datetime field for when a first attempt to login happens - add also a counter for attempts made - grab the user id and password from the user - encrypt the password and then query the login/user table for the record that matches the userid - if you get a record for the id then check the password for a match - if you don't match the password or the record is not found issue a message to the user and setup the input form for them again. if the record exists for the user then update the record with the number of attempts (add 1) and if the datetime has not been set or is outside 48 hrs old, set the current date/time in there. When the attempts reach 5 and the datetime is within 24 hours then reject the logon. - if the record is found and the password matches, then the user is logged in - delete the datetime value and the attempts in the table. Hope this makes sense. Play with it and you'll figure it out. As I said I just made this up and have never done this, but this should work. Of course there are others out there who may find fault with it. BTW - what do you need remote_addr for? You're not trying to limit the attempts to just one ip are you? A guy could try 5 times from one pc and then move to another device and start over, no?
  24. I have no idea. It's your code, isn't it? Then you should understand it. And if it's not your code, then you should try to understand it.
  25. What does a statement containing just a single php var actually do? Isolate your problem area and show us what you are trying
×
×
  • 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.