hi all;
I create a php classes to insert my data into database, but it doest work, please help me with this. here is my whole code.
<?php
require_once('connect.php');
class email {
var $mail_id; // hotel id in emailRecord Auto_increment.
var $name; // hotel name in emailRecord.
var $email; // hotel email id.
var $phone; // hotel contact number in emailRecord.
var $senderName; // Guest name.
var $guestPhone; // Guest Phone number.
var $guestEmail; // Guest email id.
var $subject; // Guest title.
var $message; // Guest message.
function email() {
$this->mail_id = $mail_id;
$this->name = $name;
$this->phone = $phone;
$this->senderName = $senderName;
$this->guestPhone = $guestPhone;
$this->guestEmail = $guestEmail;
$this->subject = $subject;
$this->message = $message;
}
function storedRecord($mail_id, $name, $phone, $senderName, $guestEmail, $guestPhone, $subject, $message) {
$sql="INSERT INTO emailrecord (name, phone, senderName, guestEmail, guestPhone, subject, message)
VALUES ('$name', '$phone', '$senderName', '$guestEmail', '$guestPhone', '$subject', '$message')";
echo $sql;
}
}
?>