user2630366
user2630366

Reputation: 55

How to give a href link while submitting a form in php

Actually while inserting the data into database iam passing the link to redirect that to another page but it is not submitting the form can any one help me regarding that...Please find the below link which i used

<div>
<textarea  name="comments"  rows="2" cols="100" placeholder="comments..."></textarea><br/>
</div>

<a class="btn btn-default pull-right"  
    href="<?php echo button_link."/details&cusid=".$orderdetail['customer_order_id'];?>" role="button">Submit</a>

Upvotes: 1

Views: 56

Answers (2)

Happy Coding
Happy Coding

Reputation: 2525

Change your url:

"/details&cusid=".$orderdetail['customer_order_id'] to "/details?cusid=".$orderdetail['customer_order_id']

If you want to display the data use $id = $_GET['cusid'];

Select * FROM tablename WHERE fieldname = $id;

Upvotes: 0

Hanky Panky
Hanky Panky

Reputation: 46910

/details&cusid= is incorrect, should be /details?cusid=

First query string parameter comes after ? sign, not after & sign. That is why your /details page is not seeing cusid value.

Upvotes: 1

Related Questions