Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Data from Roblox</title>
- <h3>Data from Roblox</h3>
- </head>
- <body>
- <?php
- //Change what needs changed (var names, tables, database, rows)
- $Var2 = $_POST["VarName1"];
- $Var2 = $_POST["VarName2"];
- $con = new mysqli("localhost","user","pass","Database");
- if(mysqli_connect_errno()){
- echo(mysqli_connect_error());
- }
- if($name!=NULL and $age != NULL){
- $con->query("INSERT INTO Table (Var1,Var2) VALUES ('$Var1','$Var2')");
- }
- $result = $con->query("SELECT * FROM Table");
- if($result->num_rows > 0){
- echo("Rows: <br>");
- while($row = $result->fetch_assoc()){
- echo($row["Var1"] . ": " . $row["Var2"] . "<br>");
- }
- }
- else{
- echo("Database is empty");
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement