3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once('config.php'); require_once('login.php'); if($_GET['action']=='update'){ if($_POST['newpassword'] && $_POST['oldpassword']){ $pwd = mysql_real_escape_string($_POST['newpassword']); $pwd1 = mysql_real_escape_string($_POST['newpassword1']); if($pwd==$pwd1){ $oldpwd = mysql_real_escape_string($_POST['oldpassword']); $user_name = $_SESSION['user_name']; $querychk6 = mysql_query("SELECT * FROM $tbl_name WHERE user_name = '$user_name' AND password = '$oldpassword'"); $true = mysql_num_rows($querychk6); if($true=='1'){ $query6 = "UPDATE $tbl_name SET password = '$pwd' WHERE user_name = '$user_name' AND password = '$oldpwd'"; $result1 = mysql_query( $query6 ) or die(mysql_error()); $responsemsg = "Password changed successfully!"; header("Location: members.php?msg_gr=".$responsemsg); } else { $responsemsg = "Error! You entered wrong old password!"; } } else { $responsemsg = "Sorry, You entered different passwords in verification!"; } } require_once('header.php'); ?> <?php if (isSet($_GET['msg_gr'])){ echo "<span style='display:block;margin-top:20px;text-align:center;color:green;font-weight:bold;'>".htmlentities($_GET['msg_gr'])."</span><br/>"; } ?> <?php if (isSet($responsemsg)){ echo "<span style='display:block;margin-top:20px;text-align:center;color:red;font-weight:bold;'>".htmlentities($responsemsg)."</span><br/>"; } ?> <form name="form3" method="post" action=""> <strong>Change Password </strong> Old Password: <input name="oldpassword" type="password" id="oldpassword" /> New Password: <input name="newpassword" type="password" id="newpassword" /> Type Password again: <input name="newpassword1" type="password" id="newpassword1" /> <input type="submit" name="Submit" value="Change" /></form> <?php } ?> Welcome, <?=$_SESSION['fullname']?><br /> <br /> <br /> What you want to do?<br /> <a href="?view=downloads" >Browse through our downloads</<br /> <?php require_once('header.php'); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 105
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 84
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 83
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 81
Branch analysis from position: 56
2 jumps found. (Code = 47) Position 1 = 71, Position 2 = 75
Branch analysis from position: 71
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 96
Branch analysis from position: 88
2 jumps found. (Code = 43) Position 1 = 98, Position 2 = 104
Branch analysis from position: 98
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 104
Branch analysis from position: 96
Branch analysis from position: 81
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 96
Branch analysis from position: 88
Branch analysis from position: 96
Branch analysis from position: 84
Branch analysis from position: 12
Branch analysis from position: 105
filename:       /in/lAQP0
function name:  (null)
number of ops:  112
compiled vars:  !0 = $pwd, !1 = $pwd1, !2 = $oldpwd, !3 = $user_name, !4 = $querychk6, !5 = $tbl_name, !6 = $oldpassword, !7 = $true, !8 = $query6, !9 = $result1, !10 = $responsemsg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INCLUDE_OR_EVAL                                          'config.php', REQUIRE_ONCE
    3     1        INCLUDE_OR_EVAL                                          'login.php', REQUIRE_ONCE
    4     2        FETCH_R                      global              ~13     '_GET'
          3        FETCH_DIM_R                                      ~14     ~13, 'action'
          4        IS_EQUAL                                                 ~14, 'update'
          5      > JMPZ                                                     ~15, ->105
    5     6    >   FETCH_R                      global              ~16     '_POST'
          7        FETCH_DIM_R                                      ~17     ~16, 'newpassword'
          8      > JMPZ_EX                                          ~17     ~17, ->12
          9    >   FETCH_R                      global              ~18     '_POST'
         10        FETCH_DIM_R                                      ~19     ~18, 'oldpassword'
         11        BOOL                                             ~17     ~19
         12    > > JMPZ                                                     ~17, ->84
    6    13    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         14        CHECK_FUNC_ARG                                           
         15        FETCH_FUNC_ARG               global              $20     '_POST'
         16        FETCH_DIM_FUNC_ARG                               $21     $20, 'newpassword'
         17        SEND_FUNC_ARG                                            $21
         18        DO_FCALL                                      0  $22     
         19        ASSIGN                                                   !0, $22
    7    20        INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         21        CHECK_FUNC_ARG                                           
         22        FETCH_FUNC_ARG               global              $24     '_POST'
         23        FETCH_DIM_FUNC_ARG                               $25     $24, 'newpassword1'
         24        SEND_FUNC_ARG                                            $25
         25        DO_FCALL                                      0  $26     
         26        ASSIGN                                                   !1, $26
    8    27        IS_EQUAL                                                 !0, !1
         28      > JMPZ                                                     ~28, ->83
    9    29    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         30        CHECK_FUNC_ARG                                           
         31        FETCH_FUNC_ARG               global              $29     '_POST'
         32        FETCH_DIM_FUNC_ARG                               $30     $29, 'oldpassword'
         33        SEND_FUNC_ARG                                            $30
         34        DO_FCALL                                      0  $31     
         35        ASSIGN                                                   !2, $31
   10    36        FETCH_R                      global              ~33     '_SESSION'
         37        FETCH_DIM_R                                      ~34     ~33, 'user_name'
         38        ASSIGN                                                   !3, ~34
   11    39        INIT_FCALL_BY_NAME                                       'mysql_query'
         40        ROPE_INIT                                     7  ~37     'SELECT+%2A+FROM+'
         41        ROPE_ADD                                      1  ~37     ~37, !5
         42        ROPE_ADD                                      2  ~37     ~37, '+WHERE+user_name+%3D+%27'
         43        ROPE_ADD                                      3  ~37     ~37, !3
         44        ROPE_ADD                                      4  ~37     ~37, '%27+AND+password+%3D+%27'
         45        ROPE_ADD                                      5  ~37     ~37, !6
         46        ROPE_END                                      6  ~36     ~37, '%27'
         47        SEND_VAL_EX                                              ~36
         48        DO_FCALL                                      0  $41     
         49        ASSIGN                                                   !4, $41
   12    50        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         51        SEND_VAR_EX                                              !4
         52        DO_FCALL                                      0  $43     
         53        ASSIGN                                                   !7, $43
   13    54        IS_EQUAL                                                 !7, '1'
         55      > JMPZ                                                     ~45, ->81
   14    56    >   ROPE_INIT                                     9  ~47     'UPDATE+'
         57        ROPE_ADD                                      1  ~47     ~47, !5
         58        ROPE_ADD                                      2  ~47     ~47, '+SET+password+%3D+%27'
         59        ROPE_ADD                                      3  ~47     ~47, !0
         60        ROPE_ADD                                      4  ~47     ~47, '%27+WHERE+user_name+%3D+%27'
         61        ROPE_ADD                                      5  ~47     ~47, !3
         62        ROPE_ADD                                      6  ~47     ~47, '%27+AND+password+%3D+%27'
         63        ROPE_ADD                                      7  ~47     ~47, !2
         64        ROPE_END                                      8  ~46     ~47, '%27'
         65        ASSIGN                                                   !8, ~46
   15    66        INIT_FCALL_BY_NAME                                       'mysql_query'
         67        SEND_VAR_EX                                              !8
         68        DO_FCALL                                      0  $53     
         69        ASSIGN                                           ~54     !9, $53
         70      > JMPNZ_EX                                         ~54     ~54, ->75
         71    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         72        DO_FCALL                                      0  $55     
         73      > EXIT                                                     $55
         74*       BOOL                                             ~54     <true>
   16    75    >   ASSIGN                                                   !10, 'Password+changed+successfully%21'
   17    76        INIT_FCALL                                               'header'
         77        CONCAT                                           ~57     'Location%3A+members.php%3Fmsg_gr%3D', !10
         78        SEND_VAL                                                 ~57
         79        DO_ICALL                                                 
         80      > JMP                                                      ->82
   19    81    >   ASSIGN                                                   !10, 'Error%21+You+entered+wrong+old+password%21'
         82    > > JMP                                                      ->84
   22    83    >   ASSIGN                                                   !10, 'Sorry%2C+You+entered+different+passwords+in+verification%21'
   26    84    >   INCLUDE_OR_EVAL                                          'header.php', REQUIRE_ONCE
   28    85        FETCH_IS                                         ~62     '_GET'
         86        ISSET_ISEMPTY_DIM_OBJ                         0          ~62, 'msg_gr'
         87      > JMPZ                                                     ~63, ->96
         88    >   INIT_FCALL                                               'htmlentities'
         89        FETCH_R                      global              ~64     '_GET'
         90        FETCH_DIM_R                                      ~65     ~64, 'msg_gr'
         91        SEND_VAL                                                 ~65
         92        DO_ICALL                                         $66     
         93        CONCAT                                           ~67     '%3Cspan+style%3D%27display%3Ablock%3Bmargin-top%3A20px%3Btext-align%3Acenter%3Bcolor%3Agreen%3Bfont-weight%3Abold%3B%27%3E', $66
         94        CONCAT                                           ~68     ~67, '%3C%2Fspan%3E%3Cbr%2F%3E'
         95        ECHO                                                     ~68
   29    96    >   ISSET_ISEMPTY_CV                                         !10
         97      > JMPZ                                                     ~69, ->104
         98    >   INIT_FCALL                                               'htmlentities'
         99        SEND_VAR                                                 !10
        100        DO_ICALL                                         $70     
        101        CONCAT                                           ~71     '%3Cspan+style%3D%27display%3Ablock%3Bmargin-top%3A20px%3Btext-align%3Acenter%3Bcolor%3Ared%3Bfont-weight%3Abold%3B%27%3E', $70
        102        CONCAT                                           ~72     ~71, '%3C%2Fspan%3E%3Cbr%2F%3E'
        103        ECHO                                                     ~72
   30   104    >   ECHO                                                     '%0A%3Cform+name%3D%22form3%22+method%3D%22post%22+action%3D%22%22%3E%0A%3Cstrong%3EChange+Password+%3C%2Fstrong%3E%0AOld+Password%3A+%3Cinput+name%3D%22oldpassword%22+type%3D%22password%22+id%3D%22oldpassword%22+%2F%3E%0ANew+Password%3A+%3Cinput+name%3D%22newpassword%22+type%3D%22password%22+id%3D%22newpassword%22+%2F%3E%0AType+Password+again%3A+%3Cinput+name%3D%22newpassword1%22+type%3D%22password%22+id%3D%22newpassword1%22+%2F%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22Submit%22+value%3D%22Change%22+%2F%3E%3C%2Fform%3E%0A%0A%0A%0A%0A%0A%0A%0A%0A'
   50   105    >   ECHO                                                     'Welcome%2C+'
        106        FETCH_R                      global              ~73     '_SESSION'
        107        FETCH_DIM_R                                      ~74     ~73, 'fullname'
        108        ECHO                                                     ~74
        109        ECHO                                                     '%3Cbr+%2F%3E%0A%3Cbr+%2F%3E%0A%3Cbr+%2F%3E%0A%0A%0AWhat+you+want+to+do%3F%3Cbr+%2F%3E%0A%3Ca+href%3D%22%3Fview%3Ddownloads%22+%3EBrowse+through+our+downloads%3C%2F%3Cbr+%2F%3E%0A%0A%0A%0A'
   61   110        INCLUDE_OR_EVAL                                          'header.php', REQUIRE_ONCE
   62   111      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.59 ms | 1413 KiB | 17 Q