The data from the server is display to the users as pictures of folders, i put an inline onclick to call the function, the website is for internal business use only, java has to be enabled for employee's, below is the php script, i did want to bind an onclick event to the folders but it wouldn't work. Reading what you said helped me alot as i am now going to post what they type in the text field to a php page for validation and it can return true or false, thank you and heres the php script.
<?php
session_start();
if(isset($SESSION['user_id'])){
$uid=$SESSION['user_id'];
include_once('../config.php');
if(!$querydata=mysql_query("SELECT * FROM reg WHERE id='$uid' "))
{echo "error22";
}else{
$num_data=mysql_num_rows($querydata);
while($row=mysql_fetch_array($querydata)){
$user=$row['username'];
$ff1=$row['ff'];
$jacob1=$row['jacobson'];
$sur1=$row['surplus'];
$lot1=$row['lotus'];
$rav1=$row['ravel'];
$gol1=$row['gola'];
$misc1=$row['misc'];
if($ff1==2||$jacobson1==2||$surplus1==2||$lotus1==2||$ravel1==2||$gola1==2||$misc1==2){
echo "<div id=\"list_folders\">";
if($ff1==2){
echo "<li><img src=\"images/ff_folder.png\" id=\"root_folders\" />FF</li>";
}
if($jacobson1==2){
echo "<li><img src=\"images/jac_folder.png\" ondblclick=\"open_folder('".$row['id']."','jacob','0','jacobf','jadmin');\" />Jacob</li>";
}
if($surplus1==2){
echo "<li><img src=\"images/sur_folder.png\" ondblclick=\"open_folder('".$row['id']."','sur','0','surf','sadmin');\" />Sur</li>";
}
if($lotus1==2){
echo "<li><img src=\"images/lot_folder.png\" ondblclick=\"open_folder('".$row['id']."','lot','0','lotf','ladmin');\" />Lot</li>";
}
if($ravel1==2){
echo "<li><img src=\"images/rav_folder.png\" ondblclick=\"open_folder('".$row['id']."','rav','0','ravf','radmin');\" />Rav</li>";
}
if($gola1==2){
echo "<li><img src=\"images/gol_folder.png\" ondblclick=\"open_folder('".$row['id']."','gol','0','golf','gadmin');\" />Gol</li>";
}
if($misc1==2){
echo "<li><img src=\"images/project_folder.png\" ondblclick=\"open_folder('".$row['id']."','$user','0','$userf','test');\" />$user</li>";
}
echo "</div>";
}else{
echo "You have no folders to view!";
}
}
}
}else{
echo "error21";
}
?>
If sending the data to a php page is the best option please let me know and i will mark it as resolved, thank you for your time.