Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * WARNING!
- * This EXAMPLE code contains severe SECURITY ISSUES
- * which should be addressed before real-life usage!!
- *
- * These issues have been ignored intentionally to
- * simplify the code so we can focus on the topic
- * in discussion.
- */
- // Lets test if the form has been submitted
- if(isset($_POST['SubmitCheck'])) {
- // The form has been submited
- // Check the values!
- if($_POST['Nome'] != "" and $_POST['Telefone'] != "") {
- $client = new SoapClient('http://177.8.126.123:80/WebService1.asmx?WSDL');
- $function = 'InserirTeste';
- $arguments= array('InserirTeste' => array(
- 'Nome' => $_POST['Nome'],
- 'Telefone' => $_POST['Telefone'],
- 'Email' => $_POST['Email']
- ));
- $options = array('location' => 'http://177.8.126.123:80/WebService1.asmx');
- $result = $client->__soapCall($function, $arguments, $options);
- echo 'Response: ';
- print_r($result);
- // Check if the checkbox was checked
- if(isset($_POST['Remember'])) {
- echo "<br>You will be remembered!";
- }
- else {
- echo "<br>John who?!";
- }
- }
- else {
- // User info invalid!
- echo "Sorry mate, try again!";
- }
- }
- else {
- // The form has not been posted
- // Show the form
- ?>
- <form class="login-form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="form-teste">
- <h3 class="form-title">Teste gratuito 2 hora(s) </h3>
- <div class="form-group">
- <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
- <label class="control-label visible-ie8 visible-ie9">Seu nome</label>
- <div class="input-icon">
- <i class="fa fa-user"></i>
- <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Seu nome" name="Nome" /> </div>
- </div>
- <div class="form-group">
- <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
- <label class="control-label visible-ie8 visible-ie9">Seu e-mail</label>
- <div class="input-icon">
- <i class="fa fa-envelope"></i>
- <input class="form-control placeholder-no-fix" type="text" placeholder="Seu e-mail" name="Email" /> </div>
- <div class="form-group">
- <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
- <label class="control-label visible-ie8 visible-ie9">Seu whatsapp</label>
- <div class="input-icon">
- <i class="fa fa-envelope"></i>
- <input class="form-control placeholder-no-fix" type="text" placeholder="Seu whatsapp" name="Telefone" /> </div>
- </div>
- <div class="form-group">
- <label class="control-label visible-ie8 visible-ie9">Plano</label>
- <select name="plano" id="planos" class="select2 form-control">
- <option value=""></option>
- <option value="4551">Canais SD + HD / ADULTOS</option>
- <option value="5312">Canais SD + HD / ADULTOS / VOD / SERIADOS</option>
- <option value="5313">Canais SD</option>
- </select>
- </div>
- Remember me: <input type="checkbox" name="Remember" checked="chekced">
- <input type="hidden" name="SubmitCheck" value="sent">
- <button type="submit" name="Form1_Submit" class="btn green pull-right"> Gerar teste </button>
- </form>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement