G
G
gomer17262015-12-11 13:58:57
PHP
gomer1726, 2015-12-11 13:58:57

Connect get parameters for order how to implement?

There is a link "iPhone4s" click => product page (iPhone 4) -> chose color, chose memory clicked "submit" => order page => there if all fields (name, index, etc.) are entered correctly INSERT into the database => but the color and memory that were previously selected on another page but are in the GET parameters on the page with orders do not fall into the database. help out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kravchenko, 2015-12-11
@gomer1726

add them to the form from there.

<form method="post" action="/order">
<input type="hidden" name="memory" value="<?=$_GET['memory']?>"/>
<input type="hidden" name="memory" value="<?=$_GET['color']?>"/>
<input type="submit" value="Submit" />
</form>

Better not directly from $_GET, pass these values ​​through the controller, give them to the view.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question