RE: What is "app.php?ph=cus&id=4"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 7:15 AM -0700 6/4/10, Michael Calkins wrote:
How is it used for a website then?

It's just data received by a $_GET[] (data in the url) such as:

<?php
$whatever = $_GET['ph'];
$id = $_GET['id'];

Then you can use that data (after scrubbing) to obtain data from a database, such as:

SELECT cost FROM items WHERE whatever='$whatever' AND id = '$id'

From that you could get the cost of the item and use it in your script.

This is just one way to send data from one page/script to another.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux