Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You have so many if/else cases - if I encounter a situation like this, I like to add an echo in every single case, echoing where the code is, so when it dies I know where it ended at, including success cases like it did insert. Make sure to print_r your $_GET and $_POST and see that you have the data you expected.
  2. If you have an array you cannot just echo it. You need to loop through it, probably using foreach(). For quick debugging you can use print_r() or var_dump().
  3. The code you posted has nothing to do with insert or update
  4. You'll need to do an UPDATE statement instead of an INSERT is the best I can guess without code.
  5. Not needed - they can stay locked until the next time they try to log in, at which point the code should check if enough time has passed to allow them to attempt again.
  6. "$OP_PUPPET" takes longer to evaluate. See above. You have so much in your code in strings that doesn't need to be. A number is not a string. Just because PHP will evaluate it usually ok doesn't make it right. Fix all your numbers and variables that don't need to be inside strings.
  7. $OP_KEY_ARRAY['$OP_PUPPET']["PU_SKILX"] The first key is equal to the string $OP_PUPPET not the value of $OP_PUPPET. If you put a variable in single quotes it does not evaluate. You either want $OP_PUPPET or 'OP_PUPPET'
  8. I was researching this recently and I read that if you put Open Office on your server, you can use it via PHP to open a .doc and read it. My goal was to convert it to a PDF. I ended up not having to do it so I never tried but that's where I'd start.
  9. Each class in it's own file.
  10. And with thanks like that I can't imagine why no one else wants to help!
  11. Move the $xml.='</event>'; line inside the loop.
  12. I'm trying to copy an existing file using a php script, run on the command line. I've tried copy() and also a script from the comments on copy() http://www.php.net/manual/en/function.copy.php#102320 No matter how I try to open the file I get " failed to open stream: No such file or directory". I tried changing the name of the file, and the ext, and both. The file does exist, and if I run cp old new, the file gets copied fine. Current code <?php $source = '/www/documents/myfile.pdf'; $destination = '/www/documents/mypdf.pdf.bak'; copy($source, $destination); ?> Warning: copy(/www/documents/myfile.pdf): failed to open stream: No such file or directory in /www/cron/historic.php on line 3 ~$ ls /www/hua/compucom113dev/client/documents/ myfile.pdf ~$ cp /www/documents/myfile.pdf /www/documents/myfile.pdf.bak ~$ ls /www/hua/compucom113dev/client/documents/ myfile.pdf myfile.pdf.bak I had chmod in the script at one point to make sure the directory had the permissions needed but it didn't make a difference so I removed it. I can add it back if someone can help explain what to set it to. I was doing 0777 then back to 0755 at the end.
  13. Form? Are you trying to talk about the forum? You know this is a forum, right? I'd still like to hear your way to insert multiple items.
  14. replace these two lines $ids = implode(', ', $_GET['delete_these']); $sql = "DELETE FROM contact WHERE msg_id IN($ids)"; with print_r($_GET['delete_these']); $ids = implode(', ', $_GET['delete_these']); $sql = "DELETE FROM contact WHERE msg_id IN($ids)"; echo "<br />SQL: $sql<br />"; I'm curious what it says. Edit: Just noticed, you need to do the deleting before you select and display, otherwise you won't see your changes until the next page view. Also make your form valid with a method and action. http://www.htmlhelp.com/reference/html40/forms/form.html
  15. What are you TRYING to do?? You did the same thing with isset(). Functions do not have $ in front, unless the $name contains the name of a function.
  16. It's cool, just ignore the help we've given you, and provide a useless reply without trying to fix the error based on the advice you've been given from two people.
  17. comment out the header. If you don't understand the rest of what I said....
  18. Post your new sql. Did you call it VersesID or versesID
  19. SELECT rubric.title, rubric.code, schedule.name, schedule.short_title FROM schedule INNER JOIN rubric ON rubric.code = substr(schedule.name, 4) ORDER BY rubric.code Should give you every schedule with the matched title & code. Then when you loop through them you store which code you're on, and if the current one is different than the previous, before printing the schedule info, print out the new rubric info. Also, to clarify - they ARE related. Just in a bad way. You should add a primary key field.
  20. You're the one who said to never do it the way he's doing it, I think the onus is on you to come up with an alternative. Or were you just regurgitating something you read?
  21. Knock it off. Read the rules.
×
×
  • 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.