How to send data from one page to another without using form? I am getting id and type by GET method
<a href="form.php?id=<?php echo $_GET['id']."&".$_GET['type']; ?>" class="orderbtn">Order Now</a>
When I go to form.php, I fill the form and click on the submit button my form page code is below
form.php
<div id="form">
<p class="rf">*Required Fields </p>
<form action="formsubmitted.php" onsubmit="return formValidate()" method="post" name="myform">
<span class="required" title="Required Field">*</span>
<span style="font-size:16px; color:#000; font-family:Arial, Helvetica, sans-serif;">Name: </span>
<input id="name" title="Enter Your Full Name" type="text" name="name" autofocus="autofocus" required="required" value=""/><br/>
<span class="required" title="Required Field">*</span>
<span style="font-size:16px;color:#000; font-family:Arial, Helvetica, sans-serif;padding-right:10px;">Email:</span>
<input id="email" type="email" name="email" required="required" placeholder="xyz@example.com"/><br/>
<span class="required" title="Required Field">*</span>
<span style="font-size:16px;color:#000; font-family:Arial, Helvetica, sans-serif;">Address:</span>
<input id="address" title="Enter Address" type="text" name="address" required="required" value=""/><br/>
<span class="required" title="Required Field">*</span>
<span style="font-size:16px;color:#000; font-family:Arial, Helvetica, sans-serif;">Contact Number:</span>
<input id="contactno" title="Enter Number" type="text" name="contact" required="required" value=""/><br/>
<input id="submit" name="submit" type="submit" value="Submit"/></span>
</form>
</div>
When I submitted it goes to formsubmitted.php page where I am inserting data into database using post method i.e.
formsubmitted.php
<?php
$connection = mysql_connect("localhost","root","");
$select_db = mysql_select_db("fashion",$connection);
if(!$connection)
{
die ("Could not Connect".mysql_error());
}
$query = "INSERT INTO `order` (flname,email,address,contact) VALUES ('{$_POST['name']}','{$_POST['email']}','{$_POST['address']}','{$_POST['contact']}');";
echo $query . "<br />";
$res = mysql_query($query,$connection);
if(!$res) {die("Could Not Enter Data".mysql_error());}
else { echo "Enter Data Successfully."; }
?>
I want to insert the id and type which I am getting in the url in form page how can i do that?