Greetings all.
I am new to this forum and to learning PHP. I am currently also learning perl script. I hope I can get my problems described properly but please bear with me.
Here is the issue I have. I installed a petition on my website and it seems to work for the most part.
I can view the pages ok but there appear to be some argument inconsistencies or incorrect variable readings occurring that result in errors like this:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/forbidz/public_html/petition/functions.php3 on line 201
Here is the section that contains line 201:
function recentSignatures() {
global $recent_signatories, $individuals_query;
echo "<strong>$recent_signatories</strong>\n<br><UL><em>";
$sql = "SELECT FirstName,LastName,City,State,Country FROM phPetition WHERE Public='on' AND confirmDate IS NOT NULL ORDER BY confirmDate DESC LIMIT 0,15";
$individuals_query = mysql_query($sql);
while ($individuals_array = mysql_fetch_array($individuals_query)) {
echo "<LI>" . stripslashes($individuals_array["FirstName"]) . " "
. stripslashes($individuals_array["LastName"])
. " $from ";
echo stripslashes($individuals_array["City"]) . " ";
echo stripslashes($individuals_array["State"]) . " ";
// echo "stripslashes($individuals_array["Country"]);
}
echo "</em></UL>";
}
This is line 201:
while ($individuals_array = mysql_fetch_array($individuals_query)) {
Here are the settings from the functions.php file: (I did not change these settings at all yet)
$params['host'] = 'bangalore.flora.ca'; // The smtp server host/ip
$params['port'] = 25; // The smtp server port
$params['helo'] = exec('hostname'); // What to use when sending the helo command. Typically, your domain/hostname
$params['auth'] = FALSE; // Whether to use basic authentication or not
$params['user'] = 'testuser'; // Username for authentication
$params['pass'] = 'testuser'; // Password for authentication
I do not think the database is working properly but this is just my guess. I know it's there because I created it. How do I know what to call the tables and what information should be in each one? If the script is interacting properly with the DB, shouldn't the tables get created when I run the script?
I may be totally wrong. I do not know enough to say for sure.
Does anyone see what I should change? If I need to show more code, just let me know what you need to see and I will put a link to a text file for easy viewing.
I hope I can get this working. The petition is against the RIAA for suing downloaders.
Best regards,
Pro Z

: