Results 1 to 9 of 9

Thread: Php ....

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Sep:2007
    Location: Bulgaria
    Posts: 74

    Php ....

    !
    PHP MYSQL! ! , ! ! , ! ???
    Code:
    <?php
    if (isset($_POST['login']))     //    
    {
          
                $name = strip_tags($_POST['name']);     //     ,  
                $family = strip_tags($_POST['family']);
                $e_mail = strip_tags($_POST['e_mail']);
                $gender = strip_tags($_POST['gender']);
                $pass1 = md5($_POST['pass1']);      //md5   
                $pass2 = md5($_POST['pass2']);
                
                if ( empty($name) || empty($family) || empty($e_mail) || empty($gender) || empty($_POST['pass1']) || empty($_POST['pass2']) )     //,    
                {
                      echo '<p>,  </p>';
                
                }
                
                else   //   ,    
                
                {
                
                       $conn = mysql_connect('localhost','root','root') or die ("   MYSQL");
                       $BD = mysql_select_db('dbpavel') or die ("    ");
                       $query = "insert into pavel (name,family,e_mail,gender,pass) values (\"$name\", \"$family\", \"$e_mail\", \"$gender\", \"$pass1\")";
                       $rez = mysql_query($query, $conn) or die ("     ");
                
                }
                if ($rez)
                {
                
                      echo '<p>  !</p>';
                      
                }
    }
                
    else
    
    {
    
    ?>
    <html>
    <head>
           <title>..::Registration::..</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head>
    <body>
    <div align="center"><h3>..:: ::..</h3></div>
     <form action="" method="post">
     <fieldset >
          <table align="center" border="1">
                <tr>
                      <td> *</td>
                      <td ><input type="text" name="name" ></td >
                </tr>
                <tr>
                      <td > *</td >
                      <td ><input type="text" name="family"></td >
                <tr>
                      <td >e-mail *</td >
                      <td ><input type="text" name="e_mail"></td>
                </tr>
                <tr>
                      <td>Gender</td >
                      <td ><input type="radio" name="gender" >male
                            <input type="radio" name="gender1" >female</td >
                </tr>
                <tr>
                      <td >Password *</td>
                      <td><input type="text" name="pass1"></td >
                </tr>
                <tr>
                      <td >Confirm password *</td>
                      <td ><input type="text" name="pass2"></td >
                </tr >
                <tr>
                      <td colspan="2" align="center">
                      <input type="submit" value="Register"></td>
                </tr> 
                
          </table >
          </fieldset>
     </form>
     </body>
     </html>
    <?php
    }
    ?>

  2. #2
    Registered User
    Join Date: Aug:2006
    Location: Sofia
    Posts: 37
    - IF .

  3. #3
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331

  4. #4
    Registered User
    Join Date: Aug:2006
    Location: Sofia
    Posts: 37
    , ?
    , , , ", " ? - , .
    Last edited by sunless; 30th September 2007 at 00:57.

  5. #5
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    , .- .

  6. #6
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    @pwizard, $_POST['login'] set-, login.
    Code:
    <input type="hidden" name="login" value="login" />
    </form> name="login" submit .
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  7. #7
    Registered User emagi's Avatar
    Join Date: Feb:2007
    Location: bulgaria
    Posts: 202
    ! !!!
    [b]@pwizard[\b], :

    md5, ! :
    [
    Code:
    $pass = md5($_POST['pass']);
    :
    Code:
    $query = "insert into pavel (name,family,e_mail,gender,pass,username) values (\"$name\", \"$family\", \"$e_mail\", \"$gender\", password( \"$pass1\" ),\"$usern\")";
    md5 , !
    ???

  8. #8
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by icaci View Post
    @pwizard, $_POST['login'] set-, login.
    Code:
    <input type="hidden" name="login" value="login" />
    </form> name="login" submit .
    - -> <form name="login" method="post"...

  9. #9
    Registered User emagi's Avatar
    Join Date: Feb:2007
    Location: bulgaria
    Posts: 202
    !
    "" ""!!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |