Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. I would not use javascript either, but the above looks fine to me...is not actually going to lowercase? I guess what I am trying to say is, it does not matter how it looks on the form as long as you use strtolower before you insert it into the DB. But just an FYI, if when validating a user for logging in, if you check the data via the database instead of PHP it is case insensitive. So yea it really should not matter if it is lower or upper, at least in my opinion =)
  2. What is different about the new script from the old script? Does it have headers? Are you testing this on the same machine or your local machine?
  3. hi premiso so i download smartftp if it has free version. vineet If you want to. That is just my FTP preference. But the above will work for you in WS_FTP. I just dislike WS_FTP because back in the day it would mess up file uploads and combine them etc. I could never get it to act right.
  4. Why not just strtolower it automatically when inserted into the DB...that is what I do. If you want it done on the page, look into JavaScript to do it.
  5. If it works, than what is the issue?
  6. WS_FTP, from what I remember, was pretty bad software. I tend to stick with SmartFTP or FireFTP, I do not like FireFTP too much since it is buggy, but the free version of SmartFTP is great. The option in WS_FTP you want is "chmod(unix)" and change that to 0777
  7. <?php $serverIP = $_SERVER['SERVER_ADDR']; echo $serverIP; ?> That is probably more efficient and less resource intense.
  8. JS Syntax error, should have known. That is what a good JS Debug Console is for (Firefox has one built in) and I always check that first if my AJAX does not work =) Good luck.
  9. So this is how the string is being interupted: "a\nb\nc\n" Since it stops at 5, notice the \n before the c would be at position 5 (note \n is considered 1 character). So imo it works as expected. If you want to evaluate it without the linebreaks, I am not sure the best way to do it, since you probably want to keep the format. But yea, just so you know what is going on.
  10. AJAX is a pain in the butt to debug. What I usually do, with post data anyways, is create a form that is just straight html to post to that ajax page, so when you submit it you see the feedback. Chances are you have an error in your code and the script is throwing the error and ajax does not know how to handle that well so it just does nothing.
  11. '\n\t\r\n\n\x3C' That is what bothers me. If you are inputting that with the single quotes, of course that is taken literally. Use double quotes "\n\t\r\n\n\x3C" And those characters will be put into their special meaning.
  12. hi ram i have tested this on my testing server that is xampp and its working fine. i m getting this error when i m testing online on linux server. so what to do. vineet Through your FTP program, right click on the directory the images are to be uploaded to, click on "Properties". Change the setting to 777 where all 3 boxes in each column are checked. This will allow php to create files in different directories.
  13. Bah how could i of missed that GRRRR!!!! well done .......BURN!!!!!......... =)
  14. The character in between is the \n (new line character) and I believe it is counted as part of the substr, but the best way to find out is test it yourself and see. So go ahead, test it. I promise it won't bite!
  15. You do not have a <form tag in that code...also if you want to change when the new option is selected you need to use Javascript's "onChange" event.
  16. <?php include('include/session.php'); $res = mysql_query("SELECT * FROM `users` ORDER BY `signupdate` LIMIT 5"); /* Gets the newest member */ while ($row = mysql_fetch_assoc($res)) { echo "New User : " . $row['username'] . "<br />"; /* Displays newest member */ } ?> Should get you what you want.
  17. A big note....you would have to rename a.html to a.php for it to work, due to the simple fact html is static.
  18. Use file_get_contents instead.
  19. Give it a try and see =) Half the fun of programming is testing new functionality!
  20. $increment = "UPDATE users SET gold = (gold - 50) WHERE username = '" . $username . "'"; mysql_query($increment,$connect); Make sure $username is either $Username or $username, be consistent through out the code.
  21. Wow this is like the 3rd or 4th topic today on this subject.... http://www.phpfreaks.com/forums/index.php/topic,230496.0.html Is the most recent, only like 5 posts down from this one.
  22. Wikipedia may be setup to redirect you depending on what country you are in. But the en. part should make it English by default if I am not mistaken.
  23. Are you sure it is not being junked by your email filter? Check your spam box and make sure.
  24. Use header to redirect back to index.php to clear up the post data. if ($_POST["form"] == "Submit"){ $name = $_POST['name']; $startDate = $_POST['startDate']; $endDate = $_POST['endDate']; $duration = $_POST['duration']; $type = $_POST['type']; $source = $_POST['source']; $details = $_POST['details']; $sql = " INSERT INTO polyphasic (name, startDate, endDate, duration, type, source, details) VALUES ('$name', '$startDate', '$endDate', '$duration', '$type', '$source', '$details') "; $query = mysql_query($sql, $con); header("Location: index.php"); } <form action="index.php" method="post"> <tr> <td><input type="text" name="name" value="" /></td> <td><input type="text" name="startDate" value="" /></td> <td><input type="text" name="endDate" value="" /></td> <td><input type="text" name="duration" value="" /></td> <td><input type="text" name="type" value="" /></td> <td><input type="text" name="source" value="" /></td> <td><input type="text" name="details" value="" /></td> </tr> </table> <input type="submit" name="form" value="Submit" /> </form> I usually send users to a "confirmation" page so they know it was entered. Using the header redirect will clear out any post data so even if they hit back it will not re-post the data.
  25. Add this to your <form tag enctype="multipart/form-data"
×
×
  • 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.