Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by ginerjm

  1. This FTP process. Could you possibly have an influence on those doing those transfers to use a script that you provide that would not only send you the file but send a message to a script that monitors an email address of yours and follows up by doing your processing?
  2. With a 'select' statement perhaps? Roughly - untested and with no regard for your capitlization: $q = "select u.userName, c.comment, c.createdAt from Users as u, Comments as c where u.userId = c.userId"; Have to ask - How are the Posts entries related to the rest of this db? Is author related to users in any way? Doesn't appear to be. And the 'title' field seems rather large.
  3. How do these files actually "appear" in your system? Can you not be alerted to a new upload before or as it happens?
  4. After reading thru the e164 post and still not understanding what it is saying I would suggest that the format that I have always used is close. Do not format the number with any parens or dashes or dots. Just the digits and save any formatting for when you need to output it.
  5. You really should be validating your input. That was why I suggested using the value attributes off the input tags so that if you had to send the form back for corrections the original input that was entered would show up and the user would not have to re-type it if it was one of the correct fields. You also need to CHECK things to make sure that they actually HAPPEN. You are blindly assuming that everything is just a-ok despite your own problems with coding. SQL calls can fail just like writing lines of php code. Check the results of the inputs to be sure they are what you expect. Check the result of the query execution to be sure it ran. Check the mysqli function that tells you if a row was actually inserted instead of just saying it.
  6. Those undefined errors are because of sloppy coding. LOOK at your attempts to grab the input values. At least you are now making valid references to the html inputs but you are not using the correct array name, namely "$_POST". Programming is very much an EXACT science. So - $post and $_post are incorrect and you need to learn soon that you must be on the lookout for these kind of 'easy' errors. You should also be validating your inputs to make sure that you have the required values needed to create a new record. If the user doesn't give you something, send them an error message and make them re-submit the form. You can assign a variable to the input's value= attribute so that when you send back the form their input (that the DID provide) shows up the second time
  7. you made all those changes but never re-posted the new code for us to debug
  8. Where does this script run from? That would be the key to using a relative path for your includes.
  9. I am not sure what you are thinking as a "redirect". Most of us may think that you are simply issuing a header("Location: $url)" command to take you to somewhere after having accomplished whatever you wanted to do before going to another script.
  10. What "it" do you want to send to paypal? Your form provides the input values; a query statement will save that data to the table. Then what? Send that very same data to paypal in some pre-defined format that Paypal has provided for you? So - follow that format, create the proper string/array/??? that the paypal API has instructed you to do, and deliver it the way the API tells you to do.
  11. HOw is this printer device connected so that your server will be able to talk to it?
  12. Do you not want to show us the updated code? And - are these error messages ACTUALLY EXACTLY what you are posting here? Seem very wrong. Do you have php error checking turned on?
  13. Answer us this: What line are you trying to execute: $sql = "SELECT COUNT(username) AS userNum FROM users WHERE username = :username"; $sql = "SELECT COUNT(email) AS emailNum FROM users WHERE email = :email"; $stmt = $db->prepare($sql); You have tried to define two queries but only the second one is going to be run. You could change this query to simply do a where clause looking for a match on the user or the email.
  14. Hmmm... your function returns true when it should, but what does it return when you are not logged in?
  15. I can only imagine what your corrected code looks like. I"ll just have to imagine what the solution could be....
  16. 1 - If you are defining your form as using POST, then use POST, not REQUEST. 2 - IMHO - caps and lowercase will bite you in the a.. every time. Pick a case (I prefer lower) and use it except when absolutely necessary (which would be when?). 3 - your problem is the upper and lower cases you are using for your names. PHP is a case-sensitive language. That is why you got into trouble here. The names on your fields have to match the indices you use in the $_POST array.
  17. Are you running PHP on your local machine or on a remote server?
  18. What kind of a button? A physical one that is connected to your device? Or an HTML submit button? What have you tried in code so far? Help us to help you. We will if you have a question about code!
  19. As well as the nifty use of an array! Touché!
  20. That was previously pointed out by me, but I kept to the "if" logic to clear up the confusion he was having.
  21. I believe that when you say " if ($a=1)" you will get a TRUE result because the operation (assignment) was successful. Hence you will always get a value of POOR in your example. When you write a PROPER if statement your variable in this limited size sample will NOT get assigned a new value and thus end up as blank. Why are we spending so much time on this topic????
  22. Try reading this code : if($a == 'one') $variable = "POOR"; elseif($a == 'two') $variable = "GOOD"; elseif($a == 'three') $variable = "VERY GOOD"; elseif($a == 'four') $variable = "EXCELLENT" ; else $variable = 'Invalid response'; Is it a little easier to read and make sense of? You could also do a little research on the "switch" construct in the manual to find an even clearer approach to this problem. Your last question seemed to be talking about the use of "==" and "=". Be aware that the two things are complete different. One moves a value around for you and the other compares two things. It's that simple and always will be.
  23. Actually it takes two lines to enable PHP error checking. You made the selection of what to show, but did you turn on the display to the client? ini_set('display_errors', '1');
  • 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.