Jump to content

Spudulene

Members
  • Posts

    11
  • Joined

  • Last visited

Spudulene's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you for the feedback, Barand. I kind of get it. But integrating that into my code is beyond my skill set. I have no formal programming experience. I am simply looking at existing code and trying to figure it out from there. Let me see if I understand this. For your example, because there are only seven items left in the list (Cupid is unset), it is having difficulty with array key number 5 (Cupid) and cannot write any further. Is that at all correct.
  2. Okay. I solved that problem. The input file was written over. Behavior is now normal. All I have left is the error Warning: Undefined array key 132 in <URL path>310nobel_f22-time.php on line 134 line 134: fputs($fp,$names[$i]); Any help would be appreciated.
  3. How does one explain this behavior? All of my scripts, I create a new one each semester, are now populating the drop down menu from the output file! It just stared on the file I was working on and I was shocked. So I checked some other files and got the same behavior. Different browsers. Quitting and reopening browser. clearing history. Even from different computers!
  4. Thank you for your feedback. I have never done any real coding from scratch in php. So, everything is a learning experience for me. I appreciate your help and patience. We are getting closer. I fixed permission issues that I believe were causing some of my problems. Including the error code is so helpful. I had zero chance to debug at all before. I do not get the error "Could not open file $filename," although I do have the code included (lines 117-121). The script is now reading and writing both $input and $output files, as it should. The page is redirecting as I want, but the emails are not being sent. This is my only error now is Warning: Undefined array key 132 in <URL path>310nobel_f22-time.php on line 134 line 134: fputs($fp,$names[$i]);
  5. I made the correction and removed code related to the"clickercode," which is not used any more, and got further this time. Below are the warnings and the associated code Warning: fopen(nobeloutput_f22-310.txt): Failed to open stream: Permission denied in <URL path>310nobel_f22-time.php on line 117 line 117: $fp=fopen($outfile,"w"); Fatal error: Uncaught TypeError: fputs(): Argument #1 ($stream) must be of type resource, bool given in <URL path>310nobel_f22-time.php:120 Stack trace: #0 <URL path>310nobel_f22-time.php(120): fputs() #1 {main} thrown in <URL path>310nobel_f22-time.php on line 120 line120: fputs($fp,$studentinfo[$i]);
  6. Here is line 97 $listnum=$_POST[laureate_list];
  7. I put in the code suggested by ginerjm and got the following error: Fatal error: Uncaught Error: Undefined constant "laureate_list" in <URL path>310nobel_f22-time.php:97 Stack trace: #0 {main} thrown in <URL path>310nobel_f22-time.php on line 97
  8. Thank you mac_gyver! I agree. I believe the problem is that our server updated their PHP last week and now the very old code has commands that do not work. It would love to reprogram it from scratch. Unfortunately, I do not have the skills to do that. ☹️
  9. Hi everyone, For the moment, there is no need to act on this. I have a much bigger problem. The script has stopped working properly. They updated our web server recently and I am guessing there issue with that. Until I get the script working again there is no point trying to add additional code. Thank you for your help to this point. I will come back once I figure out what is going on with the original code, which functioned fine last week.
  10. Thank you. I do not understand what you mean by "true code". I did attach a text file of the code because it would not allow me to attach a file with a .php extension. Below is a sample of what the output should look like. The top line is just a header row for when I import into excel. I will try to put the error line you suggest into my code and see what happens. nobeloutput_f22-310.txt
  11. Hello. This is my first time here and I am an absolute novice at php. Someone wrote a code for me years ago. I am able to tinker with it a little bit to change file names, update paths, change what is printed or emailed and maybe a couple of other extremely simple tasks. Basically the script pulls a name from a list and deletes it. Then records the name along with the person who selected that name into a text file. What I want to do is a time stamp when a new entry is added to the text file, preferentially in the same line with the other information that is collected from that form. I did try to look up how to include a time stamp in php, but it broke my page. If anyone can help I would appreciate it. 310nobel_f22-time.txt
×
×
  • 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.