Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "68.178.253.26";
- $username = "d8382639921729";
- $password = "tp#3JPSvW-u@";
- try
- {
- $conn = new PDO("mysql:host=$servername;dbname=d8382639921729;port=3308", $username, $password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- exit;
- }
- $from_user = $_POST["from_user"];
- $code = $_POST["code"];
- $description = $_POST["description"];
- $message = $_POST["message"];
- $user_to = $conn->prepare("SELECT user_id FROM wp_58qqty3rx3_lostcode WHERE lostcode_code='".$code."'")
- $user_to->queryString();
- $statement = $conn->prepare("INSERT INTO wp_58qqty3rx3_fep_messages
- (from_user, to_user, message_title, message_contents)
- VALUES (?,?,?,?)");
- if ($statement->execute(array($from_user,$user_to,$description,$message)))
- {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- }
- ?>
Add Comment
Please, Sign In to add comment