Un botón con condiciones en php y html

 <!doctype html>
        <html lang="en">
        <head>
        <meta charset="utf-8">
        <title>selected demo</title>
        <style>
        div {
        color: red;
        }
        </style>
        <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
        </head>
        <body>


        <div class="col-md-6 m-b-15">
                                            <input type="text" id="valor1" name="valor1" class="form-control" placeholder="valor1" onblur="changeCharAlfa(this.id);
                                                        cantChar(this.id, 6);" minlength="6" maxlength="6" required />
                                        </div>
                                    </div>

                                    <div class="row m-b-15">
                                        <div class="col-md-12">
                                            <input type="text" id="valor2" name="valor2" class="form-control" placeholder="valor2" required />
                                            <button onclick=this.form.action="../class/crud/solicitud.php" type="submit" name="submit" class="btn btn-lg" style="background-color:#6820c6 !important; color:#ffffff !important;">Confirmar</button>
                                        </div>
                                    </div>

        <div></div>


        </body>
        </html>