I have been running SME7 for a while with a few problems which were solved by using the
contribs forum. However, I cannot solve this one and seek your help.
I am hosting a few websites and If you go to
www.frankstonsunrise.org/per_selection.php you
will see that I have a PHP script which uses the FORM METHOD=GET to access the names in a
MySql database. The submit "View the Details" button passes the ID number and assigns it to
the variable $rec_ID and calls the script "see_rec.php.This is so we can overcome the
duplicate entries issue.
First the script calls a function which connects to the database
include ("testholding_inc.php);
This script should process $sql="SELECT * FROM contacts WHERE ID = '$rec_ID'";
$mysql_result=mysql_query($sql,$connection);
$num_rows=mysql_num_rows($mysql_result);
if ($num_rows == 0) {
echo "sorry there is no information";
}else {
echo builds a table and processes a while statement which then calls the variables I need to
show from the database. I have checked and checked the correctness of the script and I am
sure it is correct. The first script works quite well I think since I can see that the
$rec_ID vaiable is passing the ID number across. I am wondering if there is a global setting
in the PHP configuration which needs changing. I need to get this right so that I can use
more MySql database interrogations by this method. Can you help? I am quite happy to provide
more details if you believe the script is incorrect.