Jump to content

AureliusR

Newly Registered
  • Posts

    14
  • Joined

  • Last visited

Everything posted by AureliusR

  1. Why are you marking as solved, without even addressing his concerns? I was about to start a topic with the same request: it seems a little ridiculous that on a PHP forum we can't even delete our own accounts. Adding this one feature would stop all these people from posting on here, over and over. Privacy on the internet is a big issue, and granted, if people didn't want their info shared, they shouldn't have posted it in the first place. However, mistakes happen, people become inactive on websites, and for whatever reason they would like to protect themselves by having that account deleted, especially if the website has been previously compromised. I didn't even remember signing up for this website until haveibeenpwned notified me of the breach. The fact that you are being so flippant about this, is rather concerning. I understand you are all volunteers, all doing this out of love for the website -- so please, show that love and allow those who don't want their data stored here to remove it. Aurelius.
  2. Yeah, I'm sure. The strange thing is, when I look in the images folder, the first image I tried to upload after I fixed the slash and the permission is there... but it didn't show up in the confirmation part of the script after upload.
  3. I don't understand when you mean. Why would it not fire? If the submit button is pressed, and all three fields have data, what would be stopping it? When I look in the access and error logs for apache it keeps saying move_uploaded_file: cannot move /tmp/php46zfga7 to /var/www/guitars/images/whatever.jpg ... but the permissions for that folder are universal. I'm stumped.
  4. Oh, I may have fixed it... I changed the path to explicitly be /var/www/guitars/images and then I did chmod 777 /var/www/guitars/images and it seems to be working... except the images don't show up yet. And that seems to be broken too... if I set the path to be /var/www/guitars/images, when it goes to load the image later it of course adds that whole path so it won't display it. But if I don't put the whole path it tries to move it to the wrong directory...
  5. Yeah, I just caught that after reading apache's error.log and I fixed it, and it's still not working. EDIT: I also tried './images/guitars/' as well as '/images/guitars/ ..
  6. mysql_error() is returning nothing... I'm pretty sure the problem is happening before any communication with the MySQL server, so mysql_error won't help. And by escape, do you mean add \ before any text box entries?
  7. So I've been grinding on this for hours and as I'm just learning, it's not clear to me what's wrong. I just cannot figure out what's not working. Maybe a fresh pair of eyes and a clear head will spot it. The form is supposed to submit a name, score and screenshot to 'prove' the score in a fictional game Guitar Wars. The user enters their name and score, then chooses a screenshot file (I've been using .gifs and .jpgs to test it) and then clicks add. The form is supposed to enter that info into the database, then move the image file from it's temporary spot to the /images directory of this php script. Seems simple, right? Well I can't for the life of me figure out what's wrong. When I click add the filename disappears and the form does nothing, but the name and score stay entered -- which tells me it's not getting to the end of the main if, where it clears the form data. No communcation happens with the SQL server, I've checked the logs. Here's a paste of what I have. Once again I feel like it's going to be some simple newbie mistake and I'll feel like a fool for asking here, but if I don't ask I'll go crazy Thanks everyone in advance, you guys are awesome! EDIT: The live script is here
  8. Right but I mean a plugin of sorts that will go through the code line by line and actively show you how the variables are being changed, and what the interpreter is actually doing behind the scenes. I really like tools like this because they deepen your understanding of the language, and also of how the language actually interacts with all the functions and modules it comes into contact with... Has anyone seen anything like this for PHP/MySQL? They have multitudes of them for C++, Java, etc... but I can't find much for PHP. Perhaps because it's a web-based language?
  9. MY god... now I'm embarrassed... I should have known that! What about debuggers? Do you use one/can you recommend one? Thanks so much, again, Jessica
  10. So I hate to bother everyone with what seems to be such a small question, but I assure you I DID search through the forums here looking for an answer... maybe I didn't search hard enough but the book I'm learning from couldn't help me with this problem either. The code I'm working on is a basic mailing list application, made up of three PHP/HTML pages. One for adding emails to the MySQL database table, one to remove, and one to send an email to all the emails in the list. Currently, I'm trying to learn how to make the Subject and Body fields 'sticky' in case the user makes an error and leaves a field blank in the send_email.php. I've tested it a bunch of times and tried to tweak it but the Body field won't stick! I can leave the body empty and add a subject, and the error comes up properly and the subject stays in the subject line, but if I do it the other way the body won't stick. I don't get it because the code is the same for both of them, at least as far as I can tell... Here's a paste of send_email.php. (I blanked out my email and the database password for privacy reasons). They're also teaching us to put everything in one page, instead of having two separate HTML and PHP pages. So I just migrated everything from the HTML page into the PHP page -- and it didn't affect this problem either way. So I think I did that part right. Any and all help is MUCH appreciated!! (PS also -- I do my coding on Linux (specifically Ubuntu and/or Fedora, and I would LOVE to have some sort of debugger for PHP... currently I'm using gedit with a bunch of extra plugins to support PHP coding (auto-completes, highlighting, etc) but I also have Eclipse, which I used to use for Java/Android SDK development. I know it has PHP support but it doesn't seem to work for me... does anyone have any tips? If I could get a debugger working I'm sure that would help solve a LOT of these problems!) (PPS -- the website is currently live at http://aureliusr.mine.nu/ if you want to check it out)
  11. Okay, I'll keep that in mind. At this point, though, empty() is working fine. How would I use strlen?
  12. Jessica, you get an A+ I feel stupid now, lol. I should have remembered that. Thanks a ton!
  13. Oh, of course! How silly of me... so if I change the if statement to == and drop the single quotes around the true/false assignments, I should be in business?
  14. So I'm just learning PHP and MySQL for the first time, and I've been doing really well. I have a lot of experience with HTML and C++ so a lot of concepts are very familiar. I'm currently using if { to determine whether or not an HTML form field has any data in it or not. If either of two fields are empty, it echoes a warning to the user and re-prints the form on the resulting page. Here's a link to a pastebin of what I currently have. Note that I have tried $form_output both as 'true' and 'false' & also just as plain true and false (no quotes). Both seem to fail when I reach the if statements. Even if the $subject or $body variables are false, it still starts sending the emails in the if ($output_form = false) section. So my question is partially - does PHP recognize true and false without quotes as boolean variables? Or does it just think they are plain text? I figured that because they have no quotes, if it didn't recognize them as special terms it would crash the script at that point. I need to learn how to use a PHP debugger on Linux, so if someone could help me with that too, that'd be great. I probably wouldn't even have to ask this question because the debugger would have shown me what the script is actually doing. My other question is, the book I'm learning from shows the script going in and out of the <php? tags, back to HTML, then back into <php? to close the script (at the bottom of the above link). Is that accepted syntax or is that incorrect? Thanks a lot in advance for your help!! Much appreciated.
×
×
  • 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.