0

I have a project for school that I am working on where I have a table of different parts. In the last column of each row is an "Order" where they all link to orders.php page. Each link is for a different part, though, and so I want my variables to echo on the orders.php page for the correct link clicked. I have no idea how to approach this, but it must be done this way for the class and my professor is rather useless in terms of helping students.

Basically, if I click the "Orders" link in the "Batteries" row, I want the orders.php page to show $partname = Batteries, $price = (Battery Price) ... I really can't even figure out how to get each variable to be set once that link is clicked.

Thanks a bunch for any help please.

Kyle B.
  • 389
  • 1
  • 6
  • 22
  • Use a get method in a hidden field so that it will show as u deserve.go to this link and check out. [link]http://stackoverflow.com/questions/871858/php-pass-variable-to-next-page – sentil kumar May 02 '13 at 02:01

1 Answers1

0

i had a hard time trying to understand your question but i think this may help:

you can use GET method to give information to the orders.php lie this:

in the original page you can have something like:

<a href="orders.php?partname=batteries&price=500">Battery</a>

And in the orders.php:

$partname = $_GET["partname"];
$price = $_GET["price"];

i really hope that this is waht youre looking for. for more info google PHP GET Method.

Arheisel
  • 186
  • 11