Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. If you want to experiment with the touch and unlink, you'll need to set your folder's properties to writeable by all people(777), which is not really a good idea. So set it to 777 when doing your testing, and then set it back to 711 or lower when you finish. I was hacked multiple times and files were installed on my server without me knowing and I got a call from paypal saying that a phishing scam was using my domain to host its page. Yeah, it's that important. I wasn't in trouble, but actually after the 2nd time being hacked, my hosting provider shut down my server til I could get it cleaned out. If you're not hacked now(with 777 permissions), you will be later... guaranteed
  2. ^ of course, you can create a folder long as there are no restrictions in the folder that you're trying to create the new one in. Did you even read my post? You need permissions to be able to delete a folder.
  3. it doesnt matter if you have rights, does the php script know that? The answer is no. You need to connect through ftpconnect() with your username and password. Then chmod the folder to be writeable. Delete or whatever. and then restore the settings to how they were before.
  4. ^ yeah, without php code, how can we possibly know what's wrong?
  5. How can addslashes be fooled?? ???
  6. Simple solution: don't use history.back Anytime you go back into a page that processed form data, you are resubmitting the data. You should always redirect from a page that handles post data to a page that doesn't. EDIT: and I agree with ^ you need to tell us your problem.
  7. If I read your code correctly, if someone put that their email address is "bob@gmail.com" then in your inbox, it would say "From: bob@gmail.com" ? If I am correct in that interpretation, then there's your problem right there. Many(maybe all?) shared hosting servers won't allow email to be sent on behalf of another domain other than itself. It just won't email. UInfortunately, it probably won't return false, as it did try to email, it just failed(because of the server not allowing it to). Solution: change the $sender variable to anything@YOURdomain.com. You can, however, specify a reply-to variable, which alows you to reply back to their email, at the domain they provided. But first get your code to email, then worry about a reply-to. Also, don't stripslashes... you never added them(that is, unless magic_quotes is enabled)
  8. I suffer the same epidemic. People ask for code and when its given, they say "why doesnt anyone help me?" or they try one suggestion of the 5 given and say that it doesnt work and that nobody here knows what theyre talking about.
  9. ^ omfg. THIS is why I wish people would be more specific Christ. I swear, I love helping people for free... but this is ridiculous. Think about it... You're trying to find xxx value in http://www.youtube.com/xxx(or whatever) so would it make sense to search for 'xxx' in 'http://www.youtube.com/xxx' or search for 'http://www.youtube.com/xxx' in 'xxx' ? Because you're looking for 'http://www.youtube.com/xxx' in 'xxx' which obviously would never happen. Had you told us(or me) to begin with that $surl would have the entire url, it would've taken 2 seconds to say "just remove the part in front of the code you're looking for. Once again. If you have a row in the database that says "bob" and then a variable b that says "bobby". Would it make sense to search for 'bobby' in the database to try and find 'bob' ?
  10. What's the "further processing" ? And I didnt realize you needed to search for an exact entry. Don't to the LIKE. Change it to: $surl = addslashes($_POST['surl']); $sql = "select * from wvideos where vmkey='$surl' "; If this doesn't work, then either your form is not putting the variable into $_POST['surl'] or there is some issue with your database and the values in it or the way it's setup
  11. how about changing the die to "or die(mysql_error()); " that should tell you your error
  12. I found what may be the problem: $Remove = $_POST[removeAID]; needs to be $Remove = $_POST['removeAID']; I'm almost positive this will do the trick
  13. Sorry but its not working, i have extra characters in $_POST['surl'] not in vmkey Are you putting $sql into a query?
  14. This is pure js. Basically, on each input form, you have an onBlur='set_properties(this.value)' and your set_properties function can do one a few things that will change the properties of the current page.
  15. In my page, to update the user's last login I do this: <?php // once the login has been verified and mysql_fetch_array has been executed $id = $row['user_id']; $now = strtotime("now"); $result = mysql_query("UPDATE User SET user_last_login='$now' WHERE user_id='$id' ") or die(mysql_error()); that's all you really need
  16. Is all of this in one file? If so, whats the file called? Your form's action goes to NewAssignment3.php so you need to put that php code into a file and name it NewAssignment3.php(if you havent already). Otherwise, the code looks alright. MAKE SURE in the php file that the <?php is at the very top of the file with nothing in front of it(no new lines or anything) and also make sure config.php isn't outputting anything. Also, I'd say make exit; into exit(); not sure if that matters, but just play it safe.. it's a function. One last thing.. after your "header" statement, under it and above the exit(), put a little echo statement that says "did not redirect" that way if it prints that, you know that there was output before the header statement.
  17. remove the semi-colon after $_POST['mycart'] and I'm not positive, but did you have another question? or were you just explaining that you understand whats going on?
  18. yeah, thats when it's not good. If you're giving code to someone who's more fluent in php, it would be better to make the function bc if I dont know what curdate does(nor can find out) then I'd have no way of figuring out how to manipulate it to do other things.
  19. were you saying my code wasnt readable?
  20. ^ does curdate get the value of the current time? or the midnight time of the current day?
  21. Forgot... we have to be robots... we arent allowed to give opinions or feelings.. only answers
  22. but if data isnt even being posted correctly, mysql errors mean nothing
  23. I have to disagree ONLY because if you have the raw date format in the database, it's alot easier to figure out what kind of data you need by using php functions(alot friendlier and not as hard to figure out) and then search the db accordingly. But both ways work. It's driving stick vs driving manual.
  24. Is that really necessary? Also, by looking at the OP's posting history, it's pretty obvious that they're a student. 1) yes, it was necessary. Whether he's a student or a professional, getting answers from other people is never a good thing. 2) I dont check posters's history before commenting. If he's in class, he probably should've paid attention better. 3) besides, I gave the solution. I'm allowed to give him a hard time.
  25. Have a go? Are you implying that I'm being hard on you for not knowing php? You took my post the wrong way. I gave you what you need.
×
×
  • 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.