Jump to content

ginerjm

Members
  • Posts

    5,255
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by ginerjm

  1. Actually storing images in a table is not a good idea. Better to store a link to the images wherever they are saved. Maybe create a folder for them and simply save the path in a static place and the image names in the table. Storing the path in the table leads to problems should you ever have to move the image folder. Storing the images in the table just adds bloat to the table. My $.02
  2. Aha! Like I said (as in 'IIRC') my syntax was showing a bit of rust.
  3. Did I do it incorrectly? Don't use them much at all but I thought they still read the same
  4. IIRC - $response['data']['result'][0]['value'] Pretty simple, eh?
  5. Your first attempt at using PDO with named parms was better. What you left out was the array of those parms being assigned to real values. Instead of using the ? marks, get used to using the :name like you did the first time. Then assign an array like this: $parms = array( 'name'=>$name, 'id'=>$id, ... ... ); $stmt->execute($parms); Much easier to read later on when you are doing maintenance as well as now when you are debugging.
  6. 1. Organize your code ie, do the file upload and save before you get to the query stuff. Very confusing read here 2. Once you can separate your two tasks and organize the different parts of code you may have a better view which will point out a glaring error in your logic. Hint: It is this line: if(!$stmt) 3. Read up on your use of pdo, especially how you incorporate the arguments into your process.
  7. And you don't have any backups of that either? You should get into a new hobby/business...
  8. Your host didn't do backups for you? Was this a free host or a paid one? And - where did you actually do your code-writing? On your own pc, no? So where are those files? This doesn't sound like something that can actually happen.
  9. All you have to do is write a query to pull up the info from your db and generate each email from a loop that includes each query result row's data. Think about it. Of course if you can make the email contents generic then all you have to do is feed all of the mailing addresses to your email generator and send just one email out to multiple people. Do you use PHPMailer?
  10. I"m going to guess that you can do this with JS but not php.
  11. And if you are really going to be a programmer you should enable the filename extensions in your windows install. Makes it easier to tell one file from another when it has an .html or .php or a .js or a .inc on it.
  12. Whatever that means. Perhaps you should work on your communication instead of your programming. Personally you should probably place sensitive php modules ABOVE your root folder where idle hackers have a bit harder time getting to. Now (if you are showing is the right place) you seem to have this stuff inside your web root folder - not good. And perhaps use an absolute path to avoid future confusion with your scripts.
  13. Well - actually it is not recommended to use the asterisk in a query. You should specify the fields you really want so that your maintenance later on is easier and you usage now is clearer. Pro tip.
  14. That is not the same folder as you showed us earlier. I quit. You are not AT ALL helpful.
  15. BTW - does it matter? Is this a programming concern?
  16. PS You posted a line: Posted 31 minutes ago In the php file "create", you can see "include('../db.php');" in line 3. You can see the file "db.php" in here But I don't see the todo folder in there
  17. I see that all of the font characters are bigger in the second. looks like just a difference in the character set.
  18. You are asking to include a filename of db.php in a folder above your current one. Yet - you are showing us the contents of your root folder. Isn't the db.php supposed to be one higher?
  19. Tell us what happens with your code. Show us your code in these particular areas. Add some debugging to help you diagnose the problem (echo statements!). Help us to help you. Your saying that something "can't proceed' or "can't show" is not at all helpful. Do some work on your own to find out why things aren't happening. That's how a programmer makes things happen.
  20. People here don't like clicking on things that they don't know. That's why you need to post the code that your errors are in. Usually the line number in the error message will help you locate that area.
  21. How about this: foreach ($data as $value) { if (!is_null($values['DateBooked'])) $db = date('d-m-y',strtotime($values['DateBooked'])); else $db = ''; // Now use $db to output your date booked entry $training .= '......
×
×
  • 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.