Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. So I'm not alone in my paranoia. To the OP - really man? This is what you want to accomplish with your skills? You want to incorporate yourself into the mass of idiots who think that the 'net is theirs to tamper with and use for financial and other profit? Add to the sea of spam generated by people with brains but no common sense?
  2. Is this forum actually helping someone to prepare and send "spoofed emails"?
  3. Your plan is correct. While JS will keep the user from having to deal with a delayed error message from PHP, you should always re-edit your input at the server to prevent hacking. That said, I'm confused by your last statements. Do you not know any php? Or just not ready to put in the work to figure out this problem? Basically I would grab each of the 4 inputs (answers) and then count how many are not empty. If there were too many answers, then I would send back the page (with the previous answers as the values of the html) and an error message advising them to make a change. Don't forget the php manual - an absolutely invaluable resource for php developers of all levels.
  4. add some echos to help identify where you get redirected back to login page. Echo your query too so you can verify it is what you think it is. Silly question, but does your index.html use a POST action to get to this script, or a GET? Also - you really need to do some filtering on your post vars to ensure that you are getting proper input and not endangering your app/db.
  5. Use your date value as the key value of your array and assign the project id as the value of each item in the array $dates_array['17-02-14'] = 15 $dates_array['18-02-14'] = 15 Pass the id to the function and change the function from: $datesArray[] = date($format, strtotime("{$startDate} + {$day} days")); to: $k = date($format, strtotime("{$startDate} + {$day} days")); $dates_array[$k] = $proj_id; where $proj_id is passed in as a param
  6. The join was probably doing everything correctly. Your output scheme is probably to blame. You need to add some code to recognize when a new record is the same (key?) as the last one, and in that case only output the image from that record. When the new record has a new key (diff from the last key), only then do you display all the data from the new record.
  7. can you post the code neatly in the proper tags? Many of us are hesitant to click on links to other (possibly 'bad') sites. That's why there are code tags implemented here.
  8. #1 - pagination on a mobile site is no different than a non-mobile one. #2 - try googling it and getting some code together and then if you have a problem, show it to the forum.
  9. Why don't you clean up that code, read the forum instructions and post your code properly afterwards so that we can read what you want us to amend for you?
  10. Just because you are now using PDO doesn't mean the basic principles don't still apply. $qstmt = $conn->prepare('SELECT * FROM customers'); $qstmt->execute(); while ($row = $qstmt->fetch(PDO::FETCH_ASSOC)) { $email = $row['email']; $testname = $row['name']; $testlastname = $row['lastname']; echo "$testname has a last name of $testlastname and an email of $email<br>"; } Note that you don't need to use prepare here since you don't have any arguments to your query.
  11. Instead of trying to write such a complex class, why not just use prepared statements? Trying to build a query statement for any and all circumstances would be an impossible task. Besides, the time it takes you write individual queries would never add up to the time it is going to take you to perfect such a thing (if even possible).
  12. I'm going to step in here to give you a couple of quick hints in case Jacques1 is offline. In the following lines: $num_items = mysql_result($result, 0, 'num_items'); and $num_comments = mysql_result($comment_result, 0, 'num_comments'); The variable named as the first argument of the MySQL_result call is the variable that was assigned the results of a query. You need to review the code preceding the error lines to check what variable name received the results for that specific query Look for a line such as : $result_var_name = mysqli_query(......); and be sure to match that variable name with the one in the fetch statement to correct those error messages, as below: list($num_comments) = $result_var_name->fetch_row();
  13. Do these users signin? Create a table for users that records their id, the date and a counter. If the date doesn't match today's date, start over with the counter and set the date to today. No - you don't need to translate my echos
  14. How about doing some research on databases and tables and sql? Then some reading up on what is important to do when writing an authentication script. Maybe a good book on php and MySQL would come in handy. There are many ways to learn these things. Do some research and see which ones resonate with you and your learning abilities.
  15. Generally one uses an input type of radio buttons when their is to be only one allowed response. Checkboxes are for multiple responses or for separate and distinct ones.
  16. Generally, you have a database table created to hold the pertinent items according to your needs. Obviously a uid and pswd, with the pswd encrypted using the best one you can access on your system/host. A secure application to request and authenticate your users login info is a must. A token that lets the rest of your application know whether or not the user is allowed to proceed is the ultimate results of the logon process which can be a session var or a cookie. All of this will require you learning more than a small amount of many things.
  17. You need to design a form, or write a query to get your data first?
  18. How are you making this report? Are you just using echo to output line after line after line? Are you using FPDF? Are you outputting an html table? Need more info and maybe some SMALL snippet of relevant code. Don't know what those "things" you attached are, but I can't see them. Did you review your post to see if they were visible to you?
  19. JYAP721 - Whatever made you think that you should be tinkering with all these things? Are you Trying to break your system?
  20. People here usually help people out with their code. How about showing us line 502 or the code directly around it?
  21. Try starting your session first. Why do you want to make it a result of some condition? Just start it!
×
×
  • 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.