3v4l.org

run code in 300+ PHP versions simultaneously
<?php //include('inc/config.php'); // Define variables and initialize with empty values $username = $selected_role = $password = $confirm_password = ""; $username_err = $password_err = $confirm_password_err = ""; $host = 'localhost'; $username = 'mossgate_t'; $password = 'manchester123'; $dbname = 'mossgate_NGF'; // Create a database connection $conn = mysqli_connect($host, $username, $password, $dbname); // Check the connection if (!$conn) { die('Connection failed: ' . mysqli_connect_error()); } else { echo "error"; } try { $conn = new PDO("mysql:host=$host;dbname=$dbname", $username, $password); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); } $db = mysqli_connect($servername,$username,$password,$dbname); if(!$db) { die("Connection failed: " . mysqli_connect_error()); } else { echo "error"; } class DBController { private $host = "localhost"; private $user = "mossgate_t"; private $password = "manchester123"; private $database = "mossgate_NGF"; private $conn; function __construct() { $this->conn = $this->connectDB(); } function connectDB() { $conn = mysqli_connect($this->host,$this->user,$this->password,$this->database); return $conn; } function runQuery($query) { $result = mysqli_query($this->conn,$query); while($row=mysqli_fetch_assoc($result)) { $resultset[] = $row; } if(!empty($resultset)) return $resultset; } function numRows($query) { $result = mysqli_query($this->conn,$query); $rowcount = mysqli_num_rows($result); return $rowcount; } } // Processing form data when form is submitted if($_SERVER["REQUEST_METHOD"] === "POST") { $username = trim($_POST["username"]); echo "in"; echo $username; // Validate username if(empty(trim($_POST["username"]))) { echo "step1"; $username_err = "Please enter a username."; echo "Please enter a username."; } if(!preg_match('/^[a-zA-Z0-9_]+$/', trim($_POST["username"]))) { echo "3"; $username_err = "Username can only contain letters, numbers, and underscores."; echo "Username can only contain letters, numbers, and underscores."; } else { echo "in2"; // Prepare a select statement $sql = "SELECT username FROM NGF_voucher_LOGIN WHERE username = ?"; if($stmt = mysqli_prepare($db, $sql)) { echo "step2b"; // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "s", $param_username); // Set parameters $param_username = trim($_POST["username"]); // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)) { echo "step2c"; //store result mysqli_stmt_store_result($stmt); if(mysqli_stmt_num_rows($stmt) == 1) { echo "step2d"; $username_err = "This username is already taken."; echo "This username is already taken."; } else { echo "step2e"; $username = trim($_POST["username"]); } } else { echo "Oops! Something went wrong. Please try again later."; } // Close statement mysqli_stmt_close($stmt); } else { echo"hi"; } // Validate password if(empty(trim($_POST["password"]))){ $password_err = "Please enter a password."; } elseif(strlen(trim($_POST["password"])) < 6){ $password_err = "Password must have atleast 6 characters."; } else{ $password = trim($_POST["password"]); } // Validate confirm password if(empty(trim($_POST["confirm_password"]))){ $confirm_password_err = "Please confirm password."; } else{ $confirm_password = trim($_POST["confirm_password"]); if(empty($password_err) && ($password != $confirm_password)){ $confirm_password_err = "Password did not match."; } } // Check input errors before inserting in database if(empty($username_err) && empty($password_err) && empty($confirm_password_err)){ // Prepare an insert statement $sql = "INSERT INTO NGF_voucher_LOGIN (username, password, role) VALUES (?,?,?)"; $selected_role = $_POST["RoleType"]; if($stmt = mysqli_prepare($db, $sql)){ // Bind variables to the prepared statement as parameters mysqli_stmt_bind_param($stmt, "sss", $param_username, $param_password,$selected_role); // Set parameters $param_username = $username; $param_password = password_hash($password, PASSWORD_DEFAULT); // Creates a password hash // Attempt to execute the prepared statement if(mysqli_stmt_execute($stmt)){ // Redirect to login page header("location: login.php"); } else{ echo "Oops! Something went wrong. Please try again later."; } // Close statement mysqli_stmt_close($stmt); } } // Close connection mysqli_close($conn); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Sign Up</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <style> body{ font: 14px sans-serif; } .wrapper{ width: 360px; padding: 20px; } </style> </head> <body> <div class="wrapper"> <h2>Sign Up</h2> <p>Please fill this form to create an account.</p> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> <div class="form-group"> <label>Username</label> <input type="text" name="username" class="form-control <?php echo (!empty($username_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $username; ?>"> <span class="invalid-feedback"><?php echo $username_err; ?></span> </div> <br> <div class="form-group"> <label for="Role">Role type:</label> <select name="RoleType" id="RoleType"> <option value="Canteen">Canteen</option> <option value="Shiftcontroller">Shiftcontroller</option> <option value="Admin">Admin</option> </select> </div> <div class="form-group"> <label>Password</label> <input type="password" name="password" class="form-control <?php echo (!empty($password_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $password; ?>"> <span class="invalid-feedback"><?php echo $password_err; ?></span> </div> <div class="form-group"> <label>Confirm Password</label> <input type="password" name="confirm_password" class="form-control <?php echo (!empty($confirm_password_err)) ? 'is-invalid' : ''; ?>" value="<?php echo $confirm_password; ?>"> <span class="invalid-feedback"><?php echo $confirm_password_err; ?></span> </div> <div class="form-group"> <input type="submit" class="btn btn-primary" value="Submit"> <input type="reset" class="btn btn-secondary ml-2" value="Reset"> </div> <p>Already have an account? <a href="login.php">Login here</a>.</p> </form> </div> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 61
Branch analysis from position: 56
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 242
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 81, Position 2 = 84
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 95, Position 2 = 99
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 242
Branch analysis from position: 242
2 jumps found. (Code = 43) Position 1 = 253, Position 2 = 255
Branch analysis from position: 253
1 jumps found. (Code = 42) Position 1 = 256
Branch analysis from position: 256
2 jumps found. (Code = 43) Position 1 = 265, Position 2 = 267
Branch analysis from position: 265
1 jumps found. (Code = 42) Position 1 = 268
Branch analysis from position: 268
2 jumps found. (Code = 43) Position 1 = 277, Position 2 = 279
Branch analysis from position: 277
1 jumps found. (Code = 42) Position 1 = 280
Branch analysis from position: 280
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 279
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 267
2 jumps found. (Code = 43) Position 1 = 277, Position 2 = 279
Branch analysis from position: 277
Branch analysis from position: 279
Branch analysis from position: 255
2 jumps found. (Code = 43) Position 1 = 265, Position 2 = 267
Branch analysis from position: 265
Branch analysis from position: 267
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 107, Position 2 = 149
Branch analysis from position: 107
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 144
Branch analysis from position: 123
2 jumps found. (Code = 43) Position 1 = 132, Position 2 = 136
Branch analysis from position: 132
1 jumps found. (Code = 42) Position 1 = 143
Branch analysis from position: 143
1 jumps found. (Code = 42) Position 1 = 145
Branch analysis from position: 145
1 jumps found. (Code = 42) Position 1 = 150
Branch analysis from position: 150
2 jumps found. (Code = 43) Position 1 = 157, Position 2 = 159
Branch analysis from position: 157
1 jumps found. (Code = 42) Position 1 = 175
Branch analysis from position: 175
2 jumps found. (Code = 43) Position 1 = 182, Position 2 = 184
Branch analysis from position: 182
1 jumps found. (Code = 42) Position 1 = 196
Branch analysis from position: 196
2 jumps found. (Code = 46) Position 1 = 198, Position 2 = 200
Branch analysis from position: 198
2 jumps found. (Code = 46) Position 1 = 201, Position 2 = 203
Branch analysis from position: 201
2 jumps found. (Code = 43) Position 1 = 204, Position 2 = 239
Branch analysis from position: 204
2 jumps found. (Code = 43) Position 1 = 214, Position 2 = 239
Branch analysis from position: 214
2 jumps found. (Code = 43) Position 1 = 231, Position 2 = 235
Branch analysis from position: 231
1 jumps found. (Code = 42) Position 1 = 236
Branch analysis from position: 236
2 jumps found. (Code = 43) Position 1 = 253, Position 2 = 255
Branch analysis from position: 253
Branch analysis from position: 255
Branch analysis from position: 235
2 jumps found. (Code = 43) Position 1 = 253, Position 2 = 255
Branch analysis from position: 253
Branch analysis from position: 255
Branch analysis from position: 239
Branch analysis from position: 239
Branch analysis from position: 203
Branch analysis from position: 200
Branch analysis from position: 184
2 jumps found. (Code = 46) Position 1 = 192, Position 2 = 194
Branch analysis from position: 192
2 jumps found. (Code = 43) Position 1 = 195, Position 2 = 196
Branch analysis from position: 195
2 jumps found. (Code = 46) Position 1 = 198, Position 2 = 200
Branch analysis from position: 198
Branch analysis from position: 200
Branch analysis from position: 196
Branch analysis from position: 194
Branch analysis from position: 159
2 jumps found. (Code = 43) Position 1 = 167, Position 2 = 169
Branch analysis from position: 167
1 jumps found. (Code = 42) Position 1 = 175
Branch analysis from position: 175
Branch analysis from position: 169
2 jumps found. (Code = 43) Position 1 = 182, Position 2 = 184
Branch analysis from position: 182
Branch analysis from position: 184
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 145
Branch analysis from position: 145
Branch analysis from position: 144
1 jumps found. (Code = 42) Position 1 = 150
Branch analysis from position: 150
Branch analysis from position: 149
2 jumps found. (Code = 43) Position 1 = 157, Position 2 = 159
Branch analysis from position: 157
Branch analysis from position: 159
Branch analysis from position: 84
Branch analysis from position: 242
Found catch point at position: 42
Branch analysis from position: 42
2 jumps found. (Code = 107) Position 1 = 43, Position 2 = -2
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 61
Branch analysis from position: 56
Branch analysis from position: 61
filename:       /in/QifBi
function name:  (null)
number of ops:  287
compiled vars:  !0 = $username, !1 = $selected_role, !2 = $password, !3 = $confirm_password, !4 = $username_err, !5 = $password_err, !6 = $confirm_password_err, !7 = $host, !8 = $dbname, !9 = $conn, !10 = $e, !11 = $db, !12 = $servername, !13 = $sql, !14 = $stmt, !15 = $param_username, !16 = $param_password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~17     !3, ''
          1        ASSIGN                                           ~18     !2, ~17
          2        ASSIGN                                           ~19     !1, ~18
          3        ASSIGN                                                   !0, ~19
    4     4        ASSIGN                                           ~21     !6, ''
          5        ASSIGN                                           ~22     !5, ~21
          6        ASSIGN                                                   !4, ~22
    7     7        ASSIGN                                                   !7, 'localhost'
    8     8        ASSIGN                                                   !0, 'mossgate_t'
    9     9        ASSIGN                                                   !2, 'manchester123'
   10    10        ASSIGN                                                   !8, 'mossgate_NGF'
   13    11        INIT_FCALL_BY_NAME                                       'mysqli_connect'
         12        SEND_VAR_EX                                              !7
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        SEND_VAR_EX                                              !8
         16        DO_FCALL                                      0  $28     
         17        ASSIGN                                                   !9, $28
   16    18        BOOL_NOT                                         ~30     !9
         19      > JMPZ                                                     ~30, ->25
   17    20    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_error'
         21        DO_FCALL                                      0  $31     
         22        CONCAT                                           ~32     'Connection+failed%3A+', $31
         23      > EXIT                                                     ~32
   16    24*       JMP                                                      ->26
   21    25    >   ECHO                                                     'error'
   25    26        NEW                                              $33     'PDO'
         27        ROPE_INIT                                     4  ~35     'mysql%3Ahost%3D'
         28        ROPE_ADD                                      1  ~35     ~35, !7
         29        ROPE_ADD                                      2  ~35     ~35, '%3Bdbname%3D'
         30        ROPE_END                                      3  ~34     ~35, !8
         31        SEND_VAL_EX                                              ~34
         32        SEND_VAR_EX                                              !0
         33        SEND_VAR_EX                                              !2
         34        DO_FCALL                                      0          
         35        ASSIGN                                                   !9, $33
   26    36        INIT_METHOD_CALL                                         !9, 'setAttribute'
         37        SEND_VAL_EX                                              3
         38        SEND_VAL_EX                                              2
         39        DO_FCALL                                      0          
   27    40        ECHO                                                     'Connected+successfully'
         41      > JMP                                                      ->47
   28    42  E > > CATCH                                       last         'PDOException'
   29    43    >   INIT_METHOD_CALL                                         !10, 'getMessage'
         44        DO_FCALL                                      0  $40     
         45        CONCAT                                           ~41     'Connection+failed%3A+', $40
         46        ECHO                                                     ~41
   34    47    >   INIT_FCALL_BY_NAME                                       'mysqli_connect'
         48        SEND_VAR_EX                                              !12
         49        SEND_VAR_EX                                              !0
         50        SEND_VAR_EX                                              !2
         51        SEND_VAR_EX                                              !8
         52        DO_FCALL                                      0  $42     
         53        ASSIGN                                                   !11, $42
   36    54        BOOL_NOT                                         ~44     !11
         55      > JMPZ                                                     ~44, ->61
   38    56    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_error'
         57        DO_FCALL                                      0  $45     
         58        CONCAT                                           ~46     'Connection+failed%3A+', $45
         59      > EXIT                                                     ~46
   36    60*       JMP                                                      ->62
   42    61    >   ECHO                                                     'error'
   81    62        FETCH_R                      global              ~47     '_SERVER'
         63        FETCH_DIM_R                                      ~48     ~47, 'REQUEST_METHOD'
         64        IS_IDENTICAL                                             ~48, 'POST'
         65      > JMPZ                                                     ~49, ->242
   83    66    >   INIT_FCALL                                               'trim'
         67        FETCH_R                      global              ~50     '_POST'
         68        FETCH_DIM_R                                      ~51     ~50, 'username'
         69        SEND_VAL                                                 ~51
         70        DO_ICALL                                         $52     
         71        ASSIGN                                                   !0, $52
   84    72        ECHO                                                     'in'
   85    73        ECHO                                                     !0
   87    74        INIT_FCALL                                               'trim'
         75        FETCH_R                      global              ~54     '_POST'
         76        FETCH_DIM_R                                      ~55     ~54, 'username'
         77        SEND_VAL                                                 ~55
         78        DO_ICALL                                         $56     
         79        BOOL_NOT                                         ~57     $56
         80      > JMPZ                                                     ~57, ->84
   89    81    >   ECHO                                                     'step1'
   90    82        ASSIGN                                                   !4, 'Please+enter+a+username.'
   91    83        ECHO                                                     'Please+enter+a+username.'
   94    84    >   INIT_FCALL                                               'preg_match'
         85        SEND_VAL                                                 '%2F%5E%5Ba-zA-Z0-9_%5D%2B%24%2F'
         86        INIT_FCALL                                               'trim'
         87        FETCH_R                      global              ~59     '_POST'
         88        FETCH_DIM_R                                      ~60     ~59, 'username'
         89        SEND_VAL                                                 ~60
         90        DO_ICALL                                         $61     
         91        SEND_VAR                                                 $61
         92        DO_ICALL                                         $62     
         93        BOOL_NOT                                         ~63     $62
         94      > JMPZ                                                     ~63, ->99
   96    95    >   ECHO                                                     '3'
   97    96        ASSIGN                                                   !4, 'Username+can+only+contain+letters%2C+numbers%2C+and+underscores.'
   98    97        ECHO                                                     'Username+can+only+contain+letters%2C+numbers%2C+and+underscores.'
   94    98      > JMP                                                      ->242
  102    99    >   ECHO                                                     'in2'
  105   100        ASSIGN                                                   !13, 'SELECT+username+FROM+NGF_voucher_LOGIN+WHERE+username+%3D+%3F'
  107   101        INIT_FCALL_BY_NAME                                       'mysqli_prepare'
        102        SEND_VAR_EX                                              !11
        103        SEND_VAR_EX                                              !13
        104        DO_FCALL                                      0  $66     
        105        ASSIGN                                           ~67     !14, $66
        106      > JMPZ                                                     ~67, ->149
  108   107    >   ECHO                                                     'step2b'
  110   108        INIT_FCALL_BY_NAME                                       'mysqli_stmt_bind_param'
        109        SEND_VAR_EX                                              !14
        110        SEND_VAL_EX                                              's'
        111        SEND_VAR_EX                                              !15
        112        DO_FCALL                                      0          
  113   113        INIT_FCALL                                               'trim'
        114        FETCH_R                      global              ~69     '_POST'
        115        FETCH_DIM_R                                      ~70     ~69, 'username'
        116        SEND_VAL                                                 ~70
        117        DO_ICALL                                         $71     
        118        ASSIGN                                                   !15, $71
  116   119        INIT_FCALL_BY_NAME                                       'mysqli_stmt_execute'
        120        SEND_VAR_EX                                              !14
        121        DO_FCALL                                      0  $73     
        122      > JMPZ                                                     $73, ->144
  118   123    >   ECHO                                                     'step2c'
  120   124        INIT_FCALL_BY_NAME                                       'mysqli_stmt_store_result'
        125        SEND_VAR_EX                                              !14
        126        DO_FCALL                                      0          
  122   127        INIT_FCALL_BY_NAME                                       'mysqli_stmt_num_rows'
        128        SEND_VAR_EX                                              !14
        129        DO_FCALL                                      0  $75     
        130        IS_EQUAL                                                 $75, 1
        131      > JMPZ                                                     ~76, ->136
  124   132    >   ECHO                                                     'step2d'
  125   133        ASSIGN                                                   !4, 'This+username+is+already+taken.'
  126   134        ECHO                                                     'This+username+is+already+taken.'
  122   135      > JMP                                                      ->143
  130   136    >   ECHO                                                     'step2e'
  131   137        INIT_FCALL                                               'trim'
        138        FETCH_R                      global              ~78     '_POST'
        139        FETCH_DIM_R                                      ~79     ~78, 'username'
        140        SEND_VAL                                                 ~79
        141        DO_ICALL                                         $80     
        142        ASSIGN                                                   !0, $80
  116   143    > > JMP                                                      ->145
  136   144    >   ECHO                                                     'Oops%21+Something+went+wrong.+Please+try+again+later.'
  140   145    >   INIT_FCALL_BY_NAME                                       'mysqli_stmt_close'
        146        SEND_VAR_EX                                              !14
        147        DO_FCALL                                      0          
  107   148      > JMP                                                      ->150
  144   149    >   ECHO                                                     'hi'
  149   150    >   INIT_FCALL                                               'trim'
        151        FETCH_R                      global              ~83     '_POST'
        152        FETCH_DIM_R                                      ~84     ~83, 'password'
        153        SEND_VAL                                                 ~84
        154        DO_ICALL                                         $85     
        155        BOOL_NOT                                         ~86     $85
        156      > JMPZ                                                     ~86, ->159
  150   157    >   ASSIGN                                                   !5, 'Please+enter+a+password.'
  149   158      > JMP                                                      ->175
  151   159    >   INIT_FCALL                                               'trim'
        160        FETCH_R                      global              ~88     '_POST'
        161        FETCH_DIM_R                                      ~89     ~88, 'password'
        162        SEND_VAL                                                 ~89
        163        DO_ICALL                                         $90     
        164        STRLEN                                           ~91     $90
        165        IS_SMALLER                                               ~91, 6
        166      > JMPZ                                                     ~92, ->169
  152   167    >   ASSIGN                                                   !5, 'Password+must+have+atleast+6+characters.'
  151   168      > JMP                                                      ->175
  154   169    >   INIT_FCALL                                               'trim'
        170        FETCH_R                      global              ~94     '_POST'
        171        FETCH_DIM_R                                      ~95     ~94, 'password'
        172        SEND_VAL                                                 ~95
        173        DO_ICALL                                         $96     
        174        ASSIGN                                                   !2, $96
  158   175    >   INIT_FCALL                                               'trim'
        176        FETCH_R                      global              ~98     '_POST'
        177        FETCH_DIM_R                                      ~99     ~98, 'confirm_password'
        178        SEND_VAL                                                 ~99
        179        DO_ICALL                                         $100    
        180        BOOL_NOT                                         ~101    $100
        181      > JMPZ                                                     ~101, ->184
  159   182    >   ASSIGN                                                   !6, 'Please+confirm+password.'
  158   183      > JMP                                                      ->196
  161   184    >   INIT_FCALL                                               'trim'
        185        FETCH_R                      global              ~103    '_POST'
        186        FETCH_DIM_R                                      ~104    ~103, 'confirm_password'
        187        SEND_VAL                                                 ~104
        188        DO_ICALL                                         $105    
        189        ASSIGN                                                   !3, $105
  162   190        ISSET_ISEMPTY_CV                                 ~107    !5
        191      > JMPZ_EX                                          ~107    ~107, ->194
        192    >   IS_NOT_EQUAL                                     ~108    !2, !3
        193        BOOL                                             ~107    ~108
        194    > > JMPZ                                                     ~107, ->196
  163   195    >   ASSIGN                                                   !6, 'Password+did+not+match.'
  168   196    >   ISSET_ISEMPTY_CV                                 ~110    !4
        197      > JMPZ_EX                                          ~110    ~110, ->200
        198    >   ISSET_ISEMPTY_CV                                 ~111    !5
        199        BOOL                                             ~110    ~111
        200    > > JMPZ_EX                                          ~110    ~110, ->203
        201    >   ISSET_ISEMPTY_CV                                 ~112    !6
        202        BOOL                                             ~110    ~112
        203    > > JMPZ                                                     ~110, ->239
  171   204    >   ASSIGN                                                   !13, 'INSERT+INTO+NGF_voucher_LOGIN+%28username%2C+password%2C+role%29+VALUES+%28%3F%2C%3F%2C%3F%29'
  173   205        FETCH_R                      global              ~114    '_POST'
        206        FETCH_DIM_R                                      ~115    ~114, 'RoleType'
        207        ASSIGN                                                   !1, ~115
  175   208        INIT_FCALL_BY_NAME                                       'mysqli_prepare'
        209        SEND_VAR_EX                                              !11
        210        SEND_VAR_EX                                              !13
        211        DO_FCALL                                      0  $117    
        212        ASSIGN                                           ~118    !14, $117
        213      > JMPZ                                                     ~118, ->239
  177   214    >   INIT_FCALL_BY_NAME                                       'mysqli_stmt_bind_param'
        215        SEND_VAR_EX                                              !14
        216        SEND_VAL_EX                                              'sss'
        217        SEND_VAR_EX                                              !15
        218        SEND_VAR_EX                                              !16
        219        SEND_VAR_EX                                              !1
        220        DO_FCALL                                      0          
  180   221        ASSIGN                                                   !15, !0
  181   222        INIT_FCALL                                               'password_hash'
        223        SEND_VAR                                                 !2
        224        SEND_VAL                                                 '2y'
        225        DO_ICALL                                         $121    
        226        ASSIGN                                                   !16, $121
  184   227        INIT_FCALL_BY_NAME                                       'mysqli_stmt_execute'
        228        SEND_VAR_EX                                              !14
        229        DO_FCALL                                      0  $123    
        230      > JMPZ                                                     $123, ->235
  186   231    >   INIT_FCALL                                               'header'
        232        SEND_VAL                                                 'location%3A+login.php'
        233        DO_ICALL                                                 
  184   234      > JMP                                                      ->236
  188   235    >   ECHO                                                     'Oops%21+Something+went+wrong.+Please+try+again+later.'
  192   236    >   INIT_FCALL_BY_NAME                                       'mysqli_stmt_close'
        237        SEND_VAR_EX                                              !14
        238        DO_FCALL                                      0          
  197   239    >   INIT_FCALL_BY_NAME                                       'mysqli_close'
        240        SEND_VAR_EX                                              !9
        241        DO_FCALL                                      0          
  201   242    >   ECHO                                                     '+%0A%3C%21DOCTYPE+html%3E%0A%3Chtml+lang%3D%22en%22%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A++++%3Ctitle%3ESign+Up%3C%2Ftitle%3E%0A++++%3Clink+rel%3D%22stylesheet%22+href%3D%22https%3A%2F%2Fstackpath.bootstrapcdn.com%2Fbootstrap%2F4.5.2%2Fcss%2Fbootstrap.min.css%22%3E%0A++++%3Cstyle%3E%0A++++++++body%7B+font%3A+14px+sans-serif%3B+%7D%0A++++++++.wrapper%7B+width%3A+360px%3B+padding%3A+20px%3B+%7D%0A++++%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A++++%3Cdiv+class%3D%22wrapper%22%3E%0A++++++++%3Ch2%3ESign+Up%3C%2Fh2%3E%0A++++++++%3Cp%3EPlease+fill+this+form+to+create+an+account.%3C%2Fp%3E%0A++++++++%3Cform+action%3D%22'
  217   243        INIT_FCALL                                               'htmlspecialchars'
        244        FETCH_R                      global              ~127    '_SERVER'
        245        FETCH_DIM_R                                      ~128    ~127, 'PHP_SELF'
        246        SEND_VAL                                                 ~128
        247        DO_ICALL                                         $129    
        248        ECHO                                                     $129
        249        ECHO                                                     '%22+method%3D%22post%22%3E%0A++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++%3Clabel%3EUsername%3C%2Flabel%3E%0A++++++++++++++++%3Cinput+type%3D%22text%22+name%3D%22username%22+class%3D%22form-control+'
  220   250        ISSET_ISEMPTY_CV                                 ~130    !4
        251        BOOL_NOT                                         ~131    ~130
        252      > JMPZ                                                     ~131, ->255
        253    >   QM_ASSIGN                                        ~132    'is-invalid'
        254      > JMP                                                      ->256
        255    >   QM_ASSIGN                                        ~132    ''
        256    >   ECHO                                                     ~132
        257        ECHO                                                     '%22+value%3D%22'
        258        ECHO                                                     !0
        259        ECHO                                                     '%22%3E%0A++++++++++++++++%3Cspan+class%3D%22invalid-feedback%22%3E'
  221   260        ECHO                                                     !4
        261        ECHO                                                     '%3C%2Fspan%3E%0A++++++++++++%3C%2Fdiv%3E++++%0A++++++++++++%3Cbr%3E%0A++++++++++++%0A++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++%3Clabel+for%3D%22Role%22%3ERole+type%3A%3C%2Flabel%3E%0A++++++++++++++%3Cselect+name%3D%22RoleType%22+id%3D%22RoleType%22%3E%0A++++++++++++++%3Coption+value%3D%22Canteen%22%3ECanteen%3C%2Foption%3E%0A++++++++++++++%3Coption+value%3D%22Shiftcontroller%22%3EShiftcontroller%3C%2Foption%3E%0A++++++++++++++++%3Coption+value%3D%22Admin%22%3EAdmin%3C%2Foption%3E%0A++++++++++++++%3C%2Fselect%3E%0A++++++++++++%3C%2Fdiv%3E+++%0A++%0A++%0A++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++%3Clabel%3EPassword%3C%2Flabel%3E%0A++++++++++++++++%3Cinput+type%3D%22password%22+name%3D%22password%22+class%3D%22form-control+'
  237   262        ISSET_ISEMPTY_CV                                 ~133    !5
        263        BOOL_NOT                                         ~134    ~133
        264      > JMPZ                                                     ~134, ->267
        265    >   QM_ASSIGN                                        ~135    'is-invalid'
        266      > JMP                                                      ->268
        267    >   QM_ASSIGN                                        ~135    ''
        268    >   ECHO                                                     ~135
        269        ECHO                                                     '%22+value%3D%22'
        270        ECHO                                                     !2
        271        ECHO                                                     '%22%3E%0A++++++++++++++++%3Cspan+class%3D%22invalid-feedback%22%3E'
  238   272        ECHO                                                     !5
        273        ECHO                                                     '%3C%2Fspan%3E%0A++++++++++++%3C%2Fdiv%3E%0A++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++%3Clabel%3EConfirm+Password%3C%2Flabel%3E%0A++++++++++++++++%3Cinput+type%3D%22password%22+name%3D%22confirm_password%22+class%3D%22form-control+'
  242   274        ISSET_ISEMPTY_CV                                 ~136    !6
        275        BOOL_NOT                                         ~137    ~136
        276      > JMPZ                                                     ~137, ->279
        277    >   QM_ASSIGN                                        ~138    'is-invalid'
        278      > JMP                                                      ->280
        279    >   QM_ASSIGN                                        ~138    ''
        280    >   ECHO                                                     ~138
        281        ECHO                                                     '%22+value%3D%22'
        282        ECHO                                                     !3
        283        ECHO                                                     '%22%3E%0A++++++++++++++++%3Cspan+class%3D%22invalid-feedback%22%3E'
  243   284        ECHO                                                     !6
        285        ECHO                                                     '%3C%2Fspan%3E%0A++++++++++++%3C%2Fdiv%3E%0A++++++++++++%3Cdiv+class%3D%22form-group%22%3E%0A++++++++++++++++%3Cinput+type%3D%22submit%22+class%3D%22btn+btn-primary%22+value%3D%22Submit%22%3E%0A++++++++++++++++%3Cinput

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.08 ms | 1035 KiB | 18 Q