3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /> <title>Sale</title> <link href="style/style.css" rel="stylesheet" type="text/css" /> </head> <body> <form action="sales.php" method="POST"> <div id="container"> <div id="header"><div id="header_left"></div> <div id="header_main"><b><font face="Arial" style="font-size: 14pt">Sales</font></b></div><div id="header_right"></div></div> <div id="content"> <table class="countTable"> <tr><td><font style="font-size: 14pt" color="#0066FF">Sales ID <select name="sales_id"> <option> </option> </select> <br> <br> Customer ID <select name="customer_id"> <option value=""></option> <?php include 'config.php'; mysql_select_db("ndi_db" ,$con); $result=mysql_query("SELECT * from Customers_tbl"); while($row=mysql_fetch_array($result)) { echo "<option value=".$row['Customer_id'].">".$row['Customer_name']."</option>"; } ?> </select> <br> <br> Sales Date <input type="text" name="sales_date"> <br> <br> <input type="submit" value="send" class="sub" name="submit"> <br> <br> <br> </font></td><td> <br> <br> <tr><th colspan="2" id="remain"><span style="font-weight: 400"> <br> <tr><td><font face="Tahoma" style="font-size: 10pt" color="#0066FF"> <a href="product.php">Product Form</a> | <a href="disease.php">Diseases Form</a> | <a href="throuput.php">Throuput Form</a> | <a href="throuputdetails.php">Throuput Details Form</a> | <a href="sales.php">Sales Form</a> | <a href="salesdetails.php">Sales Details Form</a> | <a href="customers.php">Customers Form</a> </font></td><td> <font face="Tahoma" style="font-size: 10pt"></font></td></tr> </table> </div> </div> </form> </body> </html> <?php if(isset($_POST['submit'])) { include "config.php"; mysql_select_db("ndi_db",$con); $insert="INSERT INTO Sales_tbl (Customer_id,Sales_date) values('$_POST[customer_id]','$_POST[sales_date]')"; mysql_query($insert,$con); } ?> <?php include "config.php"; mysql_select_db("NDI_DB", $con); $select = mysql_query("SELECT * FROM sales_tbl ORDER BY sales_id DESC"); echo "<table border=1 >"; echo "<tr>"; echo "<th>Sales ID</th>"; echo "<th>Customer ID</th>"; echo "<th>Sales Date</th>"; echo "<th>Delete</th>"; echo "</tr>"; while($row=mysql_fetch_array($select)) { echo "<tr>"; echo "<td>" .$row['Sales_id'] ."</td>"; echo "<td>" .$row['Customer_id'] ."</td>"; echo "<td>" .$row['Sales_date'] ."</td>"; echo "<td>"."<a href='sales.php?id=$row[Sales_id]'> Delete </a>". "</td>"; echo"</tr>"; } if(isset($_GET["id"])) { mysql_query("Delete FROM sales_tbl WHERE sales_id=".$_GET["id"]); } echo "</table>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 46
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 85
Branch analysis from position: 85
2 jumps found. (Code = 44) Position 1 = 90, Position 2 = 64
Branch analysis from position: 90
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 99
Branch analysis from position: 93
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 99
Branch analysis from position: 64
2 jumps found. (Code = 44) Position 1 = 90, Position 2 = 64
Branch analysis from position: 90
Branch analysis from position: 64
Branch analysis from position: 46
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
filename:       /in/pTdoc
function name:  (null)
number of ops:  101
compiled vars:  !0 = $con, !1 = $result, !2 = $row, !3 = $insert, !4 = $select
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Dwindows-1256%22+%2F%3E%0A%3Ctitle%3ESale%3C%2Ftitle%3E%0A%3Clink+href%3D%22style%2Fstyle.css%22+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+%2F%3E%0A%0A%3C%2Fhead%3E%0A%0A%3Cbody%3E%0A++%3Cform+action%3D%22sales.php%22+method%3D%22POST%22%3E%0A%3Cdiv+id%3D%22container%22%3E%0A%09%3Cdiv+id%3D%22header%22%3E%3Cdiv+id%3D%22header_left%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv+id%3D%22header_main%22%3E%3Cb%3E%3Cfont+face%3D%22Arial%22+style%3D%22font-size%3A+14pt%22%3ESales%3C%2Ffont%3E%3C%2Fb%3E%3C%2Fdiv%3E%3Cdiv+id%3D%22header_right%22%3E%3C%2Fdiv%3E%3C%2Fdiv%3E%0A++++%3Cdiv+id%3D%22content%22%3E%0A++++++++%3Ctable+class%3D%22countTable%22%3E%0A+++++++++++%3Ctr%3E%3Ctd%3E%3Cfont+style%3D%22font-size%3A+14pt%22+color%3D%22%230066FF%22%3ESales+ID+%3Cselect+name%3D%22sales_id%22%3E%0A++++++++++++%3Coption%3E+%3C%2Foption%3E%0A++++++++++++%3C%2Fselect%3E%0A%3Cbr%3E%0A%3Cbr%3E%0ACustomer+ID+%3Cselect+name%3D%22customer_id%22%3E%0A%3Coption+value%3D%22%22%3E%3C%2Foption%3E%0A'
   24     1        INCLUDE_OR_EVAL                                          'config.php', INCLUDE
   25     2        INIT_FCALL_BY_NAME                                       'mysql_select_db'
          3        SEND_VAL_EX                                              'ndi_db'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   26     6        INIT_FCALL_BY_NAME                                       'mysql_query'
          7        SEND_VAL_EX                                              'SELECT+%2A+from+Customers_tbl'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
   27    10      > JMP                                                      ->18
   30    11    >   FETCH_DIM_R                                      ~9      !2, 'Customer_id'
         12        CONCAT                                           ~10     '%3Coption+value%3D', ~9
         13        CONCAT                                           ~11     ~10, '%3E'
         14        FETCH_DIM_R                                      ~12     !2, 'Customer_name'
         15        CONCAT                                           ~13     ~11, ~12
         16        CONCAT                                           ~14     ~13, '%3C%2Foption%3E'
         17        ECHO                                                     ~14
   27    18    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0  $15     
         21        ASSIGN                                           ~16     !2, $15
         22      > JMPNZ                                                    ~16, ->11
   34    23    >   ECHO                                                     '%0A%3C%2Fselect%3E%0A%3Cbr%3E%0A%3Cbr%3E%0ASales+Date+%3Cinput+type%3D%22text%22+name%3D%22sales_date%22%3E+%0A%0A%3Cbr%3E%0A%3Cbr%3E%0A%3Cinput+type%3D%22submit%22+value%3D%22send%22+class%3D%22sub%22+name%3D%22submit%22%3E%0A%0A%3Cbr%3E%0A%3Cbr%3E%0A%0A%0A%3Cbr%3E%0A%3C%2Ffont%3E%3C%2Ftd%3E%3Ctd%3E%0A%0A%3Cbr%3E%0A%3Cbr%3E%0A%0A%0A+++++++++++%3Ctr%3E%3Cth+colspan%3D%222%22+id%3D%22remain%22%3E%3Cspan+style%3D%22font-weight%3A+400%22%3E%0A++++++++++++%3Cbr%3E%0A+++++++++++%3Ctr%3E%3Ctd%3E%3Cfont+face%3D%22Tahoma%22+style%3D%22font-size%3A+10pt%22+color%3D%22%230066FF%22%3E%0A++++++++++++%3Ca+href%3D%22product.php%22%3EProduct+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22disease.php%22%3EDiseases+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22throuput.php%22%3EThrouput+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22throuputdetails.php%22%3EThrouput+Details+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22sales.php%22%3ESales+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22salesdetails.php%22%3ESales+Details+Form%3C%2Fa%3E+%7C%0A++++++++++++%3Ca+href%3D%22customers.php%22%3ECustomers+Form%3C%2Fa%3E%0A+++++++++++%3C%2Ffont%3E%3C%2Ftd%3E%3Ctd%3E%0A%09%09%09%3Cfont+face%3D%22Tahoma%22+style%3D%22font-size%3A+10pt%22%3E%3C%2Ffont%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A+++++++%3C%2Ftable%3E%0A++++%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3C%2Fform%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A%0A%0A%0A'
   77    24        FETCH_IS                                         ~17     '_POST'
         25        ISSET_ISEMPTY_DIM_OBJ                         0          ~17, 'submit'
         26      > JMPZ                                                     ~18, ->46
   79    27    >   INCLUDE_OR_EVAL                                          'config.php', INCLUDE
   81    28        INIT_FCALL_BY_NAME                                       'mysql_select_db'
         29        SEND_VAL_EX                                              'ndi_db'
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0          
   83    32        ROPE_INIT                                     5  ~26     'INSERT+INTO+Sales_tbl+%28Customer_id%2CSales_date%29%0A++++++++values%28%27'
   84    33        FETCH_R                      global              ~21     '_POST'
         34        FETCH_DIM_R                                      ~22     ~21, 'customer_id'
         35        ROPE_ADD                                      1  ~26     ~26, ~22
         36        ROPE_ADD                                      2  ~26     ~26, '%27%2C%27'
         37        FETCH_R                      global              ~23     '_POST'
         38        FETCH_DIM_R                                      ~24     ~23, 'sales_date'
         39        ROPE_ADD                                      3  ~26     ~26, ~24
         40        ROPE_END                                      4  ~25     ~26, '%27%29'
   83    41        ASSIGN                                                   !3, ~25
   85    42        INIT_FCALL_BY_NAME                                       'mysql_query'
         43        SEND_VAR_EX                                              !3
         44        SEND_VAR_EX                                              !0
         45        DO_FCALL                                      0          
   90    46    >   ECHO                                                     '%0A%0A%0A'
   94    47        INCLUDE_OR_EVAL                                          'config.php', INCLUDE
   95    48        INIT_FCALL_BY_NAME                                       'mysql_select_db'
         49        SEND_VAL_EX                                              'NDI_DB'
         50        SEND_VAR_EX                                              !0
         51        DO_FCALL                                      0          
   96    52        INIT_FCALL_BY_NAME                                       'mysql_query'
         53        SEND_VAL_EX                                              'SELECT+%2A+FROM+sales_tbl+ORDER+BY+sales_id+DESC'
         54        DO_FCALL                                      0  $33     
         55        ASSIGN                                                   !4, $33
   97    56        ECHO                                                     '%3Ctable+border%3D1+%3E'
   98    57        ECHO                                                     '%3Ctr%3E'
   99    58        ECHO                                                     '%3Cth%3ESales+ID%3C%2Fth%3E'
  100    59        ECHO                                                     '%3Cth%3ECustomer+ID%3C%2Fth%3E'
  101    60        ECHO                                                     '%3Cth%3ESales+Date%3C%2Fth%3E'
  102    61        ECHO                                                     '%3Cth%3EDelete%3C%2Fth%3E'
  103    62        ECHO                                                     '%3C%2Ftr%3E'
  105    63      > JMP                                                      ->85
  107    64    >   ECHO                                                     '%3Ctr%3E'
  108    65        FETCH_DIM_R                                      ~35     !2, 'Sales_id'
         66        CONCAT                                           ~36     '%3Ctd%3E', ~35
         67        CONCAT                                           ~37     ~36, '%3C%2Ftd%3E'
         68        ECHO                                                     ~37
  109    69        FETCH_DIM_R                                      ~38     !2, 'Customer_id'
         70        CONCAT                                           ~39     '%3Ctd%3E', ~38
         71        CONCAT                                           ~40     ~39, '%3C%2Ftd%3E'
         72        ECHO                                                     ~40
  110    73        FETCH_DIM_R                                      ~41     !2, 'Sales_date'
         74        CONCAT                                           ~42     '%3Ctd%3E', ~41
         75        CONCAT                                           ~43     ~42, '%3C%2Ftd%3E'
         76        ECHO                                                     ~43
  111    77        ROPE_INIT                                     3  ~46     '%3Ca+href%3D%27sales.php%3Fid%3D'
         78        FETCH_DIM_R                                      ~44     !2, 'Sales_id'
         79        ROPE_ADD                                      1  ~46     ~46, ~44
         80        ROPE_END                                      2  ~45     ~46, '%27%3E+Delete+%3C%2Fa%3E'
         81        CONCAT                                           ~48     '%3Ctd%3E', ~45
         82        CONCAT                                           ~49     ~48, '%3C%2Ftd%3E'
         83        ECHO                                                     ~49
  112    84        ECHO                                                     '%3C%2Ftr%3E'
  105    85    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         86        SEND_VAR_EX                                              !4
         87        DO_FCALL                                      0  $50     
         88        ASSIGN                                           ~51     !2, $50
         89      > JMPNZ                                                    ~51, ->64
  114    90    >   FETCH_IS                                         ~52     '_GET'
         91        ISSET_ISEMPTY_DIM_OBJ                         0          ~52, 'id'
         92      > JMPZ                                                     ~53, ->99
  116    93    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         94        FETCH_R                      global              ~54     '_GET'
         95        FETCH_DIM_R                                      ~55     ~54, 'id'
         96        CONCAT                                           ~56     'Delete+FROM+sales_tbl+WHERE+sales_id%3D', ~55
         97        SEND_VAL_EX                                              ~56
         98        DO_FCALL                                      0          
  118    99    >   ECHO                                                     '%3C%2Ftable%3E'
  120   100      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.45 ms | 1398 KiB | 13 Q