I want pass input type value to another php file,i'm getting a variable to input type value i need to pass the value to other file.when ever i submitted form it is showing like that issue
(Notice: Undefined variable: category in C:\xampp\htdocs\essae\quote_enquiry.php on line 9 Notice: Undefined variable: product in C:\xampp\htdocs\essae\quote_enquiry.php on line 10).
Here my HTML code:
<form action="quote_enquiry.php" method="post">
<div class="mini_width_left">
<input type="text" name="name" id="quick_name" placeholder="Name"/>
<input type="text" name="email" id="quick_email" onblur="quickcheckEmail(this.value);" placeholder="Email" />
</div>
<div class="mini_width_right">
<input type="text" name="phone" id="quick_phone" onKeyPress="return isNumberKey(event);" placeholder="Phone" />
<input type="text" name="location" id="quick_location" placeholder="Location" />
</div>
<input type="text" name="category" id="category" value="<?php echo $category ?>" />
<input type="text" name="product" id="product" value="<?php echo $product ?>" />
<textarea name="requirement" placeholder="Message..." required=""></textarea>
<input type="submit" name="get_submit" value="SUBMIT" >
</form>
Here PHP file:quote_enquiry.php
Error:
Notice: Undefined variable: category in C:\xampp\htdocs\essae\quote_enquiry.php on line 9 Notice: Undefined variable: product in C:\xampp\htdocs\essae\quote_enquiry.php on line 10
<?php
if(isset($_POST['get_submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$mobile = $_POST['phone'];
$location = $_POST['location'];
$category = $_POST['category'];
$product = $_POST['product'];
$decs = $_POST['requirement'];
echo "<pre>";print_r($_POST);die;
}
?>