pobTag/forms.php


Home Back
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />


<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<title>PobTag - Ajax forms</title>
</head>
<body>
    <h2>Ajax forms</h2>
    <?php
    include('pobTag.php');
    $form=new pobTag('form','myform');
    $form->put();
    
    $name= new pobInput('name','','', 'text');
    $name->setId('name');
    $name->setName('name');
    $name->setLabel('Insert your name: ');
    $name->setPlaceholder('your name ... ');
    $name->closeNow(true);
    
    $email= new pobInput('email','','name="email" ', 'email');
    $email->setLabel('Insert your email address: ');
    $email->setPlaceholder('your email ... ');
    $email->closeNow(true);
    
    $submit= new pobTag("button", 'mysubmit', '', 'type=submit');
    $submit->html("submit");
    $submit->closeNow();
    
    $form->close();
    
    
    $myAjax= new pobAjax("POST", "data.php", "outputServer");
    $myAjax->sendForm('#myform');
    pobTagRend();
    ?>
    <div id="outputServer"></div>
    </body>
    </html>

Powered by Code, a simple repository browser by Fabio Di Matteo