3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php include '../../database/connect_mysql.php'; include '../../database/tables.php'; $comp = fromTable("competition", $_POST["id"]); $etablissement = fromTable("etablissement",$comp[0]['id_etablissement']); $universite = fromTable("universite",$etablissement[0]['id_universite']); $type = fromTable("type",$comp[0]['id_type']); ?> <!DOCTYPE HTML> <html> <head> <title>SPortINO</title> <link rel="stylesheet" type="text/css" href="/events_app/navigationstyle.css"/> <link rel="stylesheet" href="/events_app/bootstrap/css/bootstrap.min.css"> <script src="/events_app/bootstrap/js/jquery.min.js"></script> <script src="/events_app/bootstrap/js/bootstrap.min.js"></script> </head> <body dir="rlt" > <?php include("../../navpage.php");?> <div class="container"> <div class="row"> <div class="panel panel-success"> <div class="panel-heading"><h3>Créer une compétition</h3></div> <div class="well panel-body"> <form enctype="multipart/form-data" method="POST" action="/events_app/competition/scripts/update.php"> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="nom"><h3>Titre:</h3></label> <input type="text" name="titre" id="nom" class="form-control" placeholder="Le Nom De competition *" value=<?php echo "\"" . $comp[0]["titre"] . "\""; ?> > </div> <div class="col-md-5"> <label for="slogan"><h3>Slogan</h3></label> <input type="text" name="slogon" id="slogan" placeholder="le slogan de competition" class="form-control" value=<?php echo "\"" . $comp[0]["slogon"] . "\""; ?>> </div> </div> <!-- charger les etablissement de l'universite selectionnée--> <script type="text/javascript"> $(document).ready(function(){ $('') $('#universite').on('change',function(){ var universiteID = $(this).val(); if(universiteID > 0){ $.ajax({ type:'POST', url:'/events_app/Ajax/ajaxEtablissement.php', data:'universite_id='+universiteID, success:function(html){ $('#etablissement').html(html); } }); }else{ $('#etablissement').html('<option value="-2">Selectionner d\'habord l\'universite</option>'); } }); }); </script> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="lieu"><h3>Université :</h3></label> <select class="form-control" name="universite" id="universite"> <option value="-1" selected="selected">Selectionner l'universite</option> <?php $uns = fromTable("universite"); foreach ($uns as $un) {?> <option value=<?= "\"" . $un['id'] . "\"" ?> <?php if($universite[0]['id'] == $un['id']) echo "selected = \"selected\"";?>> <?= $un['nom'] ?> </option> <?php } ?> </select> </div> <div class="col-md-5"> <label><h3>Etablissement:</h3></label> <select class="form-control" name="etablissement" id="etablissement"> </select> </div> </div> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label><h3>Description:</h3></label> <textarea rows="7" name="description"class="form-control" placeholder="Description de la competition"> <?= $comp[0]["details"] ?> </textarea> </div> <div class="col-md-5"> <label><h3>Regles:</h3></label> <textarea rows="7" name="regles" class="form-control" placeholder="Regles de la competition"> <?php echo $comp[0]["regles"] ; ?> </textarea> </div> </div> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="sports"><h3>Types:</h3></label> <select class="form-control" name="type" id="sports"> <option value="">Selectionner le type</option> <?php $_types = fromTable("type"); foreach ($_types as $_type) {?> <option value=<?= "\"" . $_type['id'] . "\"" ?> <?php if($type[0]['id'] == $_type['id']) echo "selected = \"selected\"";?>> <?= $_type['nom'] ?> </option> <?php } ?> <br> </select> </div> <div class="col-md-5"> <label for="sports"><h3>Nombre des equipes max:</h3></label> <input type="number" name="nbmax" id="slogan" placeholder="nombre des equipes maximum" class="form-control" value=<?= "\"" . $comp[0]["nbrMaxEqui"] . "\"" ?>> </div> </div> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="sports"><h3>Frais d'inscription:</h3></label> <input type="number" name="frais" id="slogan" placeholder="frais de la competition" class="form-control" value=<?php echo "\"" . $comp[0]["frais"] . "\""; ?>> </div> <div class="col-md-5"> <label for="premierphase"><h3>Premiere Phase</h3></label> <select class="form-control" name="phase" id="sports"> <option value="">Selectionner ici</option> <option name="Groupe"value="Groupe" <?php if($comp[0]["phase1"] == "Groupe") echo "selected"; ?> >Groupe</option> <option name="Championnat"value="Championnat" <?php if($comp[0]["phase1"] == "Championnat") echo "selected"; ?> >Championnat</option> <option name="elimination"value="elimination" <?php if($comp[0]["phase1"] == "elimination") echo "selected"; ?> >Tableau a elimination directe</option> <option name="multichance"value="multichance" <?php if($comp[0]["phase1"] == "multichance") echo "selected"; ?> >Tableau multichance</option> <br> </select> </div> </div> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="premierphase"><h3>Date de Debut</h3></label> <input type="date" id="myDate" name="datedebut" value="2018-05-12" class="form-control" value=<?php echo "\"" . $comp[0]["dateDebut"] . "\""; ?>> </div> <div class="col-md-5"> <label for="premierphase"><h3>Date de Fin</h3></label> <input type="date" id="myDate" name="datefin" value="2018-05-12" class="form-control" value=<?php echo "\"" . $comp[0]["dateFin"] . "\""; ?>> </div> </div> <div class="row col-md-pull-1 col-md-offset-1"> <div class="col-md-5"> <label for="premierphase"><h3>Date limite d'inscription</h3></label> <input type="date" id="myDate" name="datelimite" value="2018-05-12" class="form-control" value=<?php echo "\"" . $comp[0]["dateLimite"] . "\""; ?>> </div> <div class="col-md-2"> <label for="image"><h3>Image :</h3></label> <input type="file" name="img" id ="img"> </div> <input type="hidden" name="id" value=<?= "\"" . $_POST["id"] . "\"" ?>"> <div class="col-md-1"></div> <div class="col-md-2" > <br><br><br> <label for="premierphase"></label> <input class="btn btn-success pull-right form-control" type="Submit"> </div> </div> <div class="row" ><br></div> </form> </div> </div> </div> </div> </body> </html> <?php $con->close(); ?>
Output for 7.3.0alpha1
Warning: include(../../database/connect_mysql.php): failed to open stream: No such file or directory in /in/MpDlK on line 1 Warning: include(): Failed opening '../../database/connect_mysql.php' for inclusion (include_path='.:') in /in/MpDlK on line 1 Warning: include(../../database/tables.php): failed to open stream: No such file or directory in /in/MpDlK on line 2 Warning: include(): Failed opening '../../database/tables.php' for inclusion (include_path='.:') in /in/MpDlK on line 2 Fatal error: Uncaught Error: Call to undefined function fromTable() in /in/MpDlK:3 Stack trace: #0 {main} thrown in /in/MpDlK on line 3
Process exited with code 255.
Output for 7.0.30 - 7.2.6
Warning: include(): open_basedir restriction in effect. File(../../database/connect_mysql.php) is not within the allowed path(s): (/tmp:/in) in /in/MpDlK on line 1 Warning: include(../../database/connect_mysql.php): failed to open stream: Operation not permitted in /in/MpDlK on line 1 Warning: include(): Failed opening '../../database/connect_mysql.php' for inclusion (include_path='.:') in /in/MpDlK on line 1 Warning: include(): open_basedir restriction in effect. File(../../database/tables.php) is not within the allowed path(s): (/tmp:/in) in /in/MpDlK on line 2 Warning: include(../../database/tables.php): failed to open stream: Operation not permitted in /in/MpDlK on line 2 Warning: include(): Failed opening '../../database/tables.php' for inclusion (include_path='.:') in /in/MpDlK on line 2 Fatal error: Uncaught Error: Call to undefined function fromTable() in /in/MpDlK:3 Stack trace: #0 {main} thrown in /in/MpDlK on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Warning: include(../../database/connect_mysql.php): File not found in /in/MpDlK on line -1 Warning: include(../../database/tables.php): File not found in /in/MpDlK on line -1 Fatal error: Uncaught Error: Call to undefined function fromTable() in /in/MpDlK:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Warning: include(../../database/connect_mysql.php): File not found in /in/MpDlK on line 1 Warning: include(../../database/tables.php): File not found in /in/MpDlK on line 2 Fatal error: Uncaught Error: Call to undefined function fromTable() in /in/MpDlK:3 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Warning: include(): open_basedir restriction in effect. File(../../database/connect_mysql.php) is not within the allowed path(s): (/tmp:/in) in /in/MpDlK on line 1 Warning: include(../../database/connect_mysql.php): failed to open stream: Operation not permitted in /in/MpDlK on line 1 Warning: include(): Failed opening '../../database/connect_mysql.php' for inclusion (include_path='.:') in /in/MpDlK on line 1 Warning: include(): open_basedir restriction in effect. File(../../database/tables.php) is not within the allowed path(s): (/tmp:/in) in /in/MpDlK on line 2 Warning: include(../../database/tables.php): failed to open stream: Operation not permitted in /in/MpDlK on line 2 Warning: include(): Failed opening '../../database/tables.php' for inclusion (include_path='.:') in /in/MpDlK on line 2 Fatal error: Call to undefined function fromTable() in /in/MpDlK on line 3
Process exited with code 255.