Reply to Not finding results

Your name:

Reply:


Posted by UKuser on 02/04/06 15:50

I'm sure this is something really simple, but the below code isnt
returning my basic mySQL results - I know the data is in there, and if
I use a value instead of $price in PHPbuilder it does return a value.

Any thoughts?

############

<HTML>
<TITLE>test lookup</TITLE>
<form method="post" action="test2.php">

<?php
function check_mysql()
{
if (mysql_errno() > 0)
{
die("<BR> MySQL error " . mysql_errno() . ": " .
mysql_error());
}
}

$db = mysql_connect("coconia.net", "nana46_nana46", "my_password");
if (!$db)
{
die("Failed to open connection to MySQL server.");
}

mysql_select_db("nana46_nana46");
check_mysql();

if(!isset($id))
{
$id=0;
}

function result_get()
{
$query = "SELECT result FROM fig_lookup WHERE $price BETWEEN
lowerval AND upperval";
$result = mysql_query($query);
check_mysql();
}

?>
<input type="text" name="price">
<input type="submit" value="hit me">
<input type="text" name="outcome" <?php echo "VALUE=\"$result\"" ?>>
</form>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация