Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('session.save_path',realpath('../../session'));
- session_start();
- $servername = "localhost";
- $username = "hackforums";
- $password = "hackforums";
- try {
- $conn = new PDO("mysql:host=$servername;dbname=hackforums", $username, $password);
- // set the PDO error mode to exception
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- echo "Connected successfully";
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- }
- $id = $_GET["id"];
- $old = $_GET["old"];
- $amount = $_GET["amount"];
- $currency_name = $_GET["currency_name"];
- $user_id = $_GET["user_id"];
- $payout = $_GET["payout"];
- $o_name = $_GET["o_name"];
- $sig = $_GET["sig"];
- echo $user_id;
- if(!isset($_SESSION['username'])) {
- echo '<script type="text/javascript" language="Javascript">
- alert("Not Logged In")
- </script> ';
- }else{
- $stmt = $dbh->prepare("INSERT INTO users (username, robux) VALUES (:username, :robux)");
- $stmt->bindParam(':username', $user_id);
- $stmt->bindParam(':robux', $payout);
- // insert one row
- $name = '$user_id';
- $value = $payout;
- $stmt->execute();
- }
- echo 1; //This don't work
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement