Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //echo md5("75QUE9-NTX4RB-YSC8V0-F2ZWIH-LJ63GA-MOPDK1")."<br>";
- //echo md5("353229020012520");
- require("rb.php");
- $user = "root";
- $pass = "1234";
- R::setup("mysql:host=localhost;dbname=testes",$user,$pass);
- if(isset($_POST['submit'])){
- $estado = R::dispense("tb_estados");
- $estado->import($_POST,"nome");
- R::store($estado);
- }
- $estados = R::find("tb_estados");
- //echo "<pre>";
- //print_r($cidades);
- foreach ($estados as $e){
- echo $e->nome."<br>";
- }
- ?>
- <h1>Add Estado</h1>
- <form method="post" action="">
- <label>Estado</label>
- <input type="text" name="nome" />
- <input type="submit" name="submit" value="add" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement