Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Do you have php error checking turned on so you might see any possible errors in this code? I'm guessing that (obviously) your if statement is failing so that means either you are specifying the upload file field name incorrectly or the size is > 200000. Try echoing out those values before you execute the test to confirm what you think is there.
  2. Why not write your query as an update query where expire is (some comparison)?
  3. Then your query is written wrong and probably didn't return any rows. You would know that if you checked num rows before beginning your fetch. You can't base a select on a compare of a timestamp to the NOW() function. Perhaps you should use UNIX_TIMESTAMP instead.
  4. Two problems. 1 - you are selecting records that have a an expire datetime(?) value greater than the current datetime. Then in your record loop you look for those records with that same expire value less than the current datetime. 2 - logically you have a problem with #1, but more importantly you are comparing apples and oranges. The MySQL NOW function produces a date and time string which probably selects what you want whereas the php time() function returns a unix timestamp which can not match the expire column if it already matches the NOW function. You can't have it both ways - either 'expire' is a m/d/y h:m:s string or it is a unix timestamp value. Make your comparisons match.
  5. I'm glad you feel that your 9 years of development experience makes you confident in finding your own solution. I usually feel that way with my 30+ years of the same, but only when I understand the problem. Perhaps you will develop some better abilities using English to explain yourself in the future. Good luck!
  6. Of course the first thing to come to mind is "what makes this office unique?". Have you done any analysis of that? Are there timezone differences involved perhaps? Is JS not enabled perhaps?
  7. Where is that message coming from? You don't show us in your code.
  8. That will teach you not to inject unsanitized values from the user directly into your query. Obviously the inclusion of that quote messes with the overall quoting of the query string and hence you error. Switch to using prepared queries so that your values can be handled properly
  9. You're being rude to a guy who is trying in the worst way to understand your vague technical details ( at least they are supposed to be technical details) and wondering what you are talking about? What the H... is "unlimited textfields"? Is that some new html tag that I don't know about? What is a "select field"? Is that a field for input aka - 'input' or is that an html "select" field? Your very loose usage of programming terms is making your English request for help hard to fathom. Is that clear to you?
  10. The message is telling you that you have the wrong path to that module. "It can't find it!"
  11. You need to be specific about your use of terms. Are we talking about "input" fields or "select" fields? Very confusing. How about deciding on your terms and re-posting your question.
  12. 1 - what is an 'unlimited textfield'? 2 - what is a 'select field'? You show examples of how you want some (input?) fields to be dependent on other fields, yet your 'rules' for those dependencies make no sense. For ex, you say 'so if there are 6 'student name' entries, the select options will be 0,1,3,4,5,6,7'. Why "1,3,4,5,6,7" and not "1,2,3,4,5,6"? Perhaps you just need to re-read your post and try again?
  13. You have marked this as anwered - what was the answer?
  14. I have no idea what you are trying to do here but your methods seem bizarre. You take one array and make another out of it - what was wrong with using the first array in both cases?
  15. I don't understand your usage of $args. In the pdo section you do this: bindParam(array_values($arg)[0], array_values($arg)[0], PDO::PARAM_STR); My understanding of 'array_values' is that you get an array of the values contained in the input array. So that means you are grabbing the first value of the input array and in this case you are using that value as both the parameter name and the parameter value in the query. Is that what you mean to do? I guess I need to see what your incoming array of '$args' looks like. Perhaps you mean to do this: foreach ($args as $k=>$v) bindparam($k,$v);
  16. what makes you say "there is a logic error"?
  17. You do realize that things that 'appear' on your screen are being put there by You, ie, Your Script. So - if you don't want them to appear, Don't Send Them.
  18. 1 - you displayed a form 2 - the user typed in credentials 3 - the user 'submitted' the form to your validation script 4 - your script validates and ??? What do you want to do after the user is logged in? Send him to a 'start' screen? Send him to the screen he attempted to go to before he logged in? Whatever it is at step #4 is when you send something to the client again to give the user something to work on. If it's the method you need to use, you can do this: $url = 'somescriptname'; header("Location: $url"); // some browsers insist on this exact format exit();
  19. Do I understand that you are trying to remove a password from a session variable, as in $_SESSION['pswd'] ? 1 - Why in the world would you store a password anywhere??? 2 - Both the $_SESSION and $_SERVER arrays are spelled as I just did - all uppercase. That could be the root of your problem.
  20. See my answer to your other post on the other forum you posted it to.
  21. Try adding php error checking (in my signature) to see which lines are giving you errors and the messages.
  22. Why do you wrap your query args in parentheses? Are you really seeking an email of (me @ domain . com) or do you want me @ domain . com? (Spaces added by me) And why do you do two queries? This s/b all done with one query. And you should be using some kind of security to scramble your password and not be storing it in your db un-scrambled. Plus - why make your db connection before you are sure to need it? Plus - you should really check the query results before fetching a row - there might not be any rows there if the query fails.(You should always verify that the query ran before checking for row count or fetching results)
  23. Not sure I understand your last post. But my question still remains. What is Your Problem?
×
×
  • 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.