Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. if (!$_POST['oldemail']!= mysql_result($result, 0)) is this line supposed to be if ($_POST['oldemail'] != $result[0])
  2. $result = mysql_query("select Email from Accounts where AccountID='$_POST[username]'") or die (mysql_error()); $sql=mysql_query("UPDATE Accounts SET email='$_POST[newemail]' where Identification='$_POST[identification]' AND Answer='$_POST[answer]' AND SecretQuestion='$_POST[question]' AND username='$_POST[username]'") or die (mysql_error());
  3. Also put this at the top of your page error_reporting(E_ALL);
  4. Add this to the end of all your queries or die (mysql_error()) and see if there is an error there, also echo your inputs to see if they are filled in.
  5. are you getting any errors, what is not working, what is it doing that is isnt supposed to?
  6. you can use MD5 as long as you use a salt. sha1 will give you a stronger encription. There are "rainbow tables out for pretty much all hashes". I use sha512 and a salt my site. But whatever hash you use, make sure you use a salt with it.
  7. You will need to change the password in the database to the hashed one. if you echo out the hash, that is what it now has become, and you will need to copy that to the database in order to login.
  8. A salt is something that is added to the password. EX. <?php $salt = 'asdfpoiu3456'; //salt to add to the password $password = $_POST['password']; //Users password $encpass = md5($salt.$password); //Salt added to the users password to make dictionary attacks almost useless. ?> Something along those lines is what you would want.
  9. if you dont want to use classes you can use this function. // Function to calculate time taken to load a page. function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); // At beginning of page add '$start = microtime_float();' without the quotes. // At the end of the page add 'substr(microtime_float() - $start, 0, 5)' without the quotes. Change the 5 to whatever number of digits you want to display. 5 will output 0.000
  10. $i=$_POST[submit]; if(isset($i)) { $ruser=$_POST[rusername]; $rpass=$_POST[rpassword]; $regcode2=$_POST[regcode]; Should be $i=$_POST['submit']; if(isset($i)) { $ruser=$_POST['username']; $rpass=$_POST['password']; $regcode2=$_POST['regcode'];
  11. This has no closing } to it { $route_number = mysql_insert_id(); //Delete info from flights to prevent double booking mysql_query("DELETE FROM flights WHERE route_number = '$route_number'"); mysql_close($connection); include 'flight_booked.php';
  12. Then do this: 1) Right click on the Notepad icon 2) Select "Run as administrator" 3) Browse to and open C:\Windows\System32\drivers\etc\hosts 4) Edit something 5) Save Then it will save successfully. Quod erat demonstrandum. Not meaning to keep the fight going, but this is not correct. I am logged in as administrator (by this I mean the built in administrator account), and it does not work that way, I cannot edit files with notepad, but can with notepad++.
  13. the system cannot find the file specified. but i can open it and modify it in notepad ++. I am the owner of the file, and I am an administrator, as that is what i am logged in as is the built in administrator.
  14. the files are not read only, it is just when using windows notepad. I can edit all files with notepad ++. here is the error I get with notepad. [attachment deleted by admin]
  15. How can I get http://www.website.com/getimage.php?id=C:/website/pics/avatars/75f623134468b269841a53da460221b17daca231.jpg to become http://www.website.com/pics/avatars/75f623134468b269841a53da460221b17daca231.jpg htaccess file Options +FollowSymlinks RewriteEngine on RewriteRule ^getimage.php?id=(.*)\.(jpg|gif|jpeg|bmp) http://www.website.com/$1\.$2 The above doesnt work, from what I can fine online that should give me http://www.website.com/C:/website/pics/avatars/75f623134468b269841a53da460221b17daca231.jpg Anybody know of how I can do this?? I dont use htaccess much so i am confused at why this isnt working.
  16. I am on vista, and I cannot edit with notpad, it tells me to check the file path to make sure the file still exists. I downloaded notepad++, and it works fine. I cannot find anything to solve this as well, all I can find is read only has been an issue since windows XP came out. but that is folders, not files, so not sure what is going on either. I am on home premium, so maybee that is the issue.
  17. I am running vista on my laptop, and I always install each separately. My SQL is fairly easy to set up, so I would install it from scratch since you have apache working fine now.
  18. Do you have windows IIS running?? I am not sure what PID 4 is, as it is not running on my machine.
  19. Did you uninstall the first one after it didnt work? Also restart the PC. else try the below. In windows vista go the command prompt, type in netstat -ao |find /i "listening" then hit enter. Look for something that looks like 0.0.0.0:80 at the end is the processid it is a 3 or 4 digit number. Open up task manager, and go to services, click on PID at the top to sort them by process id. look for that 3 or 4 digit number, and that is what is running on port 80.
  20. You only need to install wamp, it includes Apache, so that is not needed,
  21. peranha

    google

    Everything is fine in central Minnesota
  22. I was woundering how I can include images from outside the webroot. Here is my webroot C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\site1 Here is where the images are C:\site1\pics In my database I put in C:\site1\pics\75f623134468b269841a53da460221b17daca231.jpg I am not sure if this needs to be here, or if there is a configuration that needs to be changed in the config file.
  23. Have you set up your windows hosts file?
  24. have you added these in your windows hosts file?
  25. that is why it is erroring out is because of the HTML.
×
×
  • 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.