I have a site which, on clicking on a link, opens a popup with extra
details. One of the details is price. This price information is held
in a database so I should be able to code it to insert it.
I can do this without problem, if I type the filename in the query
string, but how do I get the filename automatically?
Should I be looking to do it another way?
Is there a function I could use to get filename?
Here is my coding:
<?php
$user="username";
$db = mysql_connect("localhost", $user, "password");
mysql_select_db($user,$db);
$data="SELECT * FROM full_sales WHERE file = \"104oak.php\" ";
the line above is where i have problem - what do I substitute
"104oak.php" with?
$result = mysql_query($data,$db);
$price=mysql_fetch_array($result);
echo ("On Sale at ".£.number_format($price["price"]));
?>
Here is site: www.pgnpropertyservices.co.uk/sales.php
Regards,
R.