Hey dude,
Iv tried to change the code but i get another error now.........
I am getting really really angry with this now......... 🙁
as ever thanks for ur help,
error message Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in c:\program files\apache group\apache\htdocs\check.php on line 71 marked with an *
<?php
session_start();
header("Cache-control: private");
//$page_title = "Survey Admin: Edit Questions";
include_once("start_page_login.php");
print("<h3>Welcome to the admin page <b>".$_SESSION["login"]."</h3></b><br>\n");
include_once("start_page_admin.php");
include_once("config.php");
include_once("forms.php");
doCSS();
$checkpostarray=$_POST['checkboxarray'];
if(! is_array($checkpostarray))
{
$checkpostarray = array();
}
echo("\$_POST['checkboxarray'] ");foreach ($checkpostarray as $key => $value)
{
echo("($key = $value )");
}
$query="SELECT description FROM modules WHERE description='".$_POST["description"]."'";
// Run query:
$result=mysql_query($query, $link) or die("MySQL query $query failed. Error if any: ".mysql_error());
if (!$result)
{
if ( !$result)
{
?> <P>Error performing ID query:<?=mysql_error()?></P> <?php
{
}
while ($row=mysql_fetch_array($result,MYSQL_ASSOC))
{
$available='N'; if (in_array($row['desciption'],$checkpostarray)) $available='Y';
}
$query="SELECT description FROM modules WHERE description='".$_POST["description"]."'";
// Run query:
$result=mysql_query($query, $link) or die("MySQL query $query failed. Error if any: ".mysql_error());
} // if
}
// while
// Display selection
$result = @mysql_query("Select * from modules");
if (!$result){
print"error"; mysql_error();
}
?>
<form action="<?=$SERVER['PHP_SELF']?>" method="post">
<?php while ($row=mysql_fetch_array($result,MYSQL_ASSOC))
{
* $row['module_id']?> <?=$row['description'] "Available[".$row['Available']."]";?>
<input type="checkbox" name="checkboxarray[]" value="<?php $row['module_ID']?>">
<?php
if (in_array($row['description'],$checkpostarray))
{
?>checked<?php
}
// if ?> /><br/>
<?php
}
// while ?>
<input type="submit" value="New Selection" />
</form>