3v4l.org

run code in 300+ PHP versions simultaneously
<?php $connect = mysql_connect("sql305.byetcluster.com", "freer_13053798","42024202") or die("Could not connect: " . mysql_error()); mysql_select_db('freer_13053798_reg'); if (isset ($_POST[submit])) { $username= $_POST['username']; $login= $_POST['login']; $password= $_POST['password']; $r_password= $_POST['r_password']; if ($password == $r_password){ $password = md5($paswword); $query = mysql_query("INSERT INTO reg VALUES('','$username','$login','$password')") or die(mysql_error()); } else { die("paroli doljni sovpadat"); } } if (isset ($_POST['enter'])) { $e_login = $_POST['e_login']; $e_password = md5($_POST['e_password']); $query= mysql_query ("SELECT * FROM reg WHERE login = '$e_login'"); $user_data[] = mysql_fetch_array($query); if ($user_data['password']==$e_password) { echo 'ok'; } else { echo 'ne ok'; } } ?> <form method="post" action="reg3.php"> <input type="text" name="username" placeholder=" | Username" required /><br> <input type="text" name="login" placeholder=" | Login" required /><br> <input type="password" name="password" placeholder=" | Password" required /><br> <input type="password" name="r_password" placeholder=" | Opiat password" required /><br> <input type="submit" name="submit" value="submit" /> </form> <form method="post" action="reg3.php"> <input type="text" name="e_login" placeholder=" | Login" required /><br> <input type="password" name="e_password" placeholder=" | Password" required /><br> <input type="submit" name="enter" value="enter" /> </form>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 55
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 54
Branch analysis from position: 33
2 jumps found. (Code = 47) Position 1 = 49, Position 2 = 53
Branch analysis from position: 49
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 85
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 84
Branch analysis from position: 82
1 jumps found. (Code = 42) Position 1 = 85
Branch analysis from position: 85
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 84
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 85
Branch analysis from position: 54
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 55
filename:       /in/Ol6Ys
function name:  (null)
number of ops:  87
compiled vars:  !0 = $connect, !1 = $username, !2 = $login, !3 = $password, !4 = $r_password, !5 = $paswword, !6 = $query, !7 = $e_login, !8 = $e_password, !9 = $user_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        SEND_VAL_EX                                              'sql305.byetcluster.com'
          2        SEND_VAL_EX                                              'freer_13053798'
          3        SEND_VAL_EX                                              '42024202'
          4        DO_FCALL                                      0  $10     
          5        ASSIGN                                           ~11     !0, $10
          6      > JMPNZ_EX                                         ~11     ~11, ->12
          7    >   INIT_FCALL_BY_NAME                                       'mysql_error'
          8        DO_FCALL                                      0  $12     
          9        CONCAT                                           ~13     'Could+not+connect%3A+', $12
         10      > EXIT                                                     ~13
         11*       BOOL                                             ~11     <true>
    5    12    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         13        SEND_VAL_EX                                              'freer_13053798_reg'
         14        DO_FCALL                                      0          
    7    15        FETCH_CONSTANT                                   ~16     'submit'
         16        FETCH_IS                                         ~15     '_POST'
         17        ISSET_ISEMPTY_DIM_OBJ                         0          ~15, ~16
         18      > JMPZ                                                     ~17, ->55
    9    19    >   FETCH_R                      global              ~18     '_POST'
         20        FETCH_DIM_R                                      ~19     ~18, 'username'
         21        ASSIGN                                                   !1, ~19
   10    22        FETCH_R                      global              ~21     '_POST'
         23        FETCH_DIM_R                                      ~22     ~21, 'login'
         24        ASSIGN                                                   !2, ~22
   11    25        FETCH_R                      global              ~24     '_POST'
         26        FETCH_DIM_R                                      ~25     ~24, 'password'
         27        ASSIGN                                                   !3, ~25
   12    28        FETCH_R                      global              ~27     '_POST'
         29        FETCH_DIM_R                                      ~28     ~27, 'r_password'
         30        ASSIGN                                                   !4, ~28
   13    31        IS_EQUAL                                                 !3, !4
         32      > JMPZ                                                     ~30, ->54
   14    33    >   INIT_FCALL                                               'md5'
         34        SEND_VAR                                                 !5
         35        DO_ICALL                                         $31     
         36        ASSIGN                                                   !3, $31
   15    37        INIT_FCALL_BY_NAME                                       'mysql_query'
         38        ROPE_INIT                                     7  ~34     'INSERT+INTO+reg+VALUES%28%27%27%2C%27'
         39        ROPE_ADD                                      1  ~34     ~34, !1
         40        ROPE_ADD                                      2  ~34     ~34, '%27%2C%27'
         41        ROPE_ADD                                      3  ~34     ~34, !2
         42        ROPE_ADD                                      4  ~34     ~34, '%27%2C%27'
         43        ROPE_ADD                                      5  ~34     ~34, !3
         44        ROPE_END                                      6  ~33     ~34, '%27%29'
         45        SEND_VAL_EX                                              ~33
         46        DO_FCALL                                      0  $38     
         47        ASSIGN                                           ~39     !6, $38
         48      > JMPNZ_EX                                         ~39     ~39, ->53
         49    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         50        DO_FCALL                                      0  $40     
         51      > EXIT                                                     $40
         52*       BOOL                                             ~39     <true>
         53    > > JMP                                                      ->55
   20    54    > > EXIT                                                     'paroli+doljni+sovpadat'
   26    55    >   FETCH_IS                                         ~41     '_POST'
         56        ISSET_ISEMPTY_DIM_OBJ                         0          ~41, 'enter'
         57      > JMPZ                                                     ~42, ->85
   28    58    >   FETCH_R                      global              ~43     '_POST'
         59        FETCH_DIM_R                                      ~44     ~43, 'e_login'
         60        ASSIGN                                                   !7, ~44
   29    61        INIT_FCALL                                               'md5'
         62        FETCH_R                      global              ~46     '_POST'
         63        FETCH_DIM_R                                      ~47     ~46, 'e_password'
         64        SEND_VAL                                                 ~47
         65        DO_ICALL                                         $48     
         66        ASSIGN                                                   !8, $48
   31    67        INIT_FCALL_BY_NAME                                       'mysql_query'
         68        ROPE_INIT                                     3  ~51     'SELECT+%2A+FROM+reg+WHERE+login+%3D+%27'
         69        ROPE_ADD                                      1  ~51     ~51, !7
         70        ROPE_END                                      2  ~50     ~51, '%27'
         71        SEND_VAL_EX                                              ~50
         72        DO_FCALL                                      0  $53     
         73        ASSIGN                                                   !6, $53
   32    74        INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         75        SEND_VAR_EX                                              !6
         76        DO_FCALL                                      0  $56     
         77        ASSIGN_DIM                                               !9
         78        OP_DATA                                                  $56
   33    79        FETCH_DIM_R                                      ~57     !9, 'password'
         80        IS_EQUAL                                                 !8, ~57
         81      > JMPZ                                                     ~58, ->84
   35    82    >   ECHO                                                     'ok'
         83      > JMP                                                      ->85
   39    84    >   ECHO                                                     'ne+ok'
   46    85    >   ECHO                                                     '%0A%0A%3Cform+method%3D%22post%22+action%3D%22reg3.php%22%3E%0A%3Cinput+type%3D%22text%22+name%3D%22username%22+placeholder%3D%22+%7C+Username%22+required+%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22text%22+name%3D%22login%22+placeholder%3D%22+%7C+Login%22+required+%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22password%22+name%3D%22password%22+placeholder%3D%22+%7C+Password%22++required++%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22password%22+name%3D%22r_password%22+placeholder%3D%22+%7C+Opiat+password%22++required++%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22submit%22+%2F%3E%0A%3C%2Fform%3E%0A%0A%0A%0A%3Cform+method%3D%22post%22+action%3D%22reg3.php%22%3E%0A%0A%3Cinput+type%3D%22text%22+name%3D%22e_login%22+placeholder%3D%22+%7C+Login%22+required+%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22password%22+name%3D%22e_password%22+placeholder%3D%22+%7C+Password%22++required++%2F%3E%3Cbr%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22enter%22+value%3D%22enter%22+%2F%3E%0A%3C%2Fform%3E'
   63    86      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.47 ms | 1408 KiB | 15 Q