This the PHP portion of my form.Fatal error: Function name must be a string in /var/www/specifier/adminaddproduct.php on line 74
Code: Select all
<?php
// Sets the Database Settings
$table="projects";
// Connects to the MYSQL Database and Selects the right Table
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("Unable to select database");
$query="SELECT * FROM $table ORDER BY name ASC";
// Counts the number of entries in the Database
$result=mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
mysql_close();
$i=0;
// Loops writing this the same number of times as entries
while ($i < $num)
{
$name=mysql_result($result,$i,"name");
$id222=mysql_result($result,$i,"Id");
echo "<input type=checkbox name=proj[] value=$id222>$name<br>";
$i++;
}
?>Code: Select all
<?
$array = $_POST('proj');
echo "You selected the following Project(s):<br>" ;
foreach ($array as $selected_proj) {
echo $selected_proj."<br>";
}
?>$array = $_POST('proj');
Can someone help me figure out what I am doing wrong here?
Thanks
Chris