Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
my php code doesnt work in internet explorer!!!
Old 01-27-2010, 12:44 AM my php code doesnt work in internet explorer!!!
Webmaster Talker

Posts: 611
Trades: 0
god, i spent all day making this code and it doesnt work in internet explorer 6 ( i use 6 to test my code in case people havent upgraded)

here is the code, ANY help greatly appreciated!!

EDIT: THIS WAS MY PROBLEM


Code:
<form action=\"passrecovery7.php\"


Code:
<?php
include("connect1.php");

ini_set('display_errors', 1);
  error_reporting(E_ALL);   // GREAT SNIPPET FOR DEBUGGING OUTPUTS ERRORS TO SCREEN */

    if (isset($_POST['email']) && isset($_POST['Password']) && isset($_POST['Confirm']))
    {

       // Declare Variables
        $email = mysql_real_escape_string($_POST['email']);
        $Password = mysql_real_escape_string($_POST['Password']);
        $Confirm = mysql_real_escape_string($_POST['Confirm']);

        // Encrypt passwords with md5 encryption
        $Password = md5($Password);
        $Confirm = md5($Confirm);

        if($Password != $Confirm)
        {
        echo "<br>The two passwords did not match<br>";
         echo "Please enter your email: <form action=\" \" method=\"POST\">
<input type=\email\" name=\"email\"><br>
<br>
 <br><br><br>Please enter your new password:<br>
<input type=\"password\" name=\"Password\"><br>
<br>
Please Confirm that Password:<br>
 
<input type=\"password\" name=\"Confirm\"><br>
<br><input type=\"submit\" value=\"Set Password\"</form>";
         exit;
        }

      // Check if the email already exists in database
       
      $query = "SELECT * FROM members WHERE Email = '$email' ";
      $results = mysql_num_rows(mysql_query($query));
     
       
      
      if ($results > 0)
      {

          // Insert information to the database
          mysql_query("UPDATE members SET Password='$Password' WHERE Email='$email'");

          //Send them to login
          header("Location:success.html");
      }
      else
      {
          echo "<br>That email does not exist in the database<br>";
      }
 }
    else 
    {
        // Displaying Forms
        echo "Please enter your email: <form action=\" \" method=\"POST\">
            <input type=\"text\" name=\"email\"><br>
            <br>
             <br><br>Please enter your password:<br>
            <input type=\"password\" name=\"Password\"><br>
            <br>
            Please Confirm that Password:<br>
         
        <input type=\"password\" name=\"Confirm\"><br>
            <br><input type=\"submit\" value=\"Set Password\"></form>";
    }

?>

Last edited by silverglade; 01-27-2010 at 01:28 AM..
silverglade is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-27-2010, 04:43 AM Re: my php code doesnt work in internet explorer!!!
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Just a small side note. md5() should not be used for securely storing passwords anymore. md5 has been broken. Broken as in a malicious user can, given a md5 hash, find the original password.

sha1 is a bit more secure, and you can also try adding some "salt", which is a small string you just add to the password. So, instead of doing

PHP Code:
$password md5($password); 
you can do

PHP Code:
$salt "3o_5c"// can be pretty much anything, just some random string
$password sha1($password $salt); 
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 01-27-2010, 09:16 AM Re: my php code doesnt work in internet explorer!!!
GrooN's Avatar
Average Talker

Posts: 21
Trades: 0
Quote:
EDIT: THIS WAS MY PROBLEM
<form action=\"passrecovery7.php\"
hehe, fail :P

Anyway, good luck ^^

And btw, I agree with Lizciz on using the sha1 method instead. But you should take a look at the tips and tricks thread in the php section. There's a lot of good stuff I can recommend reading ^^
__________________
- GrooN

Please login or register to view this content. Registration is FREE
GrooN is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to my php code doesnt work in internet explorer!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28167 seconds with 12 queries