Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if ($_SESSION["isusing"] == "pending" or $_SESSION["isusing"] == "true"){
- }
- else{
- header("Location: index.php?attemptaccess");
- exit;
- }
- $steamname = $_POST["steamname"];
- $steam64 = $_POST["steam64"];
- $age = $_POST["age"];
- $name =
- $choose = $_POST["choose"];
- $app = $_POST["app"];
- $exp = $_POST["exp"];
- if($_POST["name"] > 0){
- }
- else{
- $name = null;
- }
- $servername = "SSSS";
- $username = "SSSS";
- $password = "SSSS";
- $dbname = "SSSS";
- try {
- $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
- // set the PDO error mode to exception
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $sql = "INSERT INTO Apps (steamname, steam64, age, choose, app, exp)
- VALUES (`$steamname`, `$steam64`, `$age`, `$choose`, `$app`, `$exp`)";
- // use exec() because no results are returned
- $conn->exec($sql);
- header("Location: index.php?success");
- }
- catch(PDOException $e)
- {
- echo $sql . "<br>" . $e->getMessage();
- }
- $conn = null;
- session_unset();
- session_destroy();
Add Comment
Please, Sign In to add comment