Reputation: 71
i need to create a form which can be insert a php variable inside the action the example is here
<form name="form" method="post" action="order_cart.php?id=<?php echo '$.prod_diay.' ?>" >
Upvotes: 0
Views: 2952
Reputation: 1105
<form name="form" method="post" action="order_cart.php?id=<?php echo '$.prod_diay.' ?>" >
becomes
<form name="form" method="post" action="order_cart.php?id=<?php echo $prod_diay ?>" >
Notice the quotes missing around $.prod_diay.
Upvotes: 2
Reputation: 2564
how you currently have the php insert, its not actually echoing the variable contents, just the variable name, try this:
<form name="form" method="post" action="order_cart.php?id=<?php echo $prod_diay; ?>" >
Upvotes: 0
Reputation: 1535
Don't use single quotes around a variable, and not sure what the . are for?
<?php echo '$.prod_diay.' ?>
Do like this instead,
<?php echo $prod_diay; ?>
Upvotes: 1