Hello everybody,
i'm new to php and need some help..
I'm trying to create my own classified program. i have the following(test code)http://www.comgen.ca/phptest/main1.php...
I want the list of options clickable and when i click the option on the list i want the code to start a function to do the rest.. how do i make the options clickable and do execute a functoin in php..
anyhelp you can give me would be greatly appreciated.
<!-- comments -->
<BODY>
<?PHP
$CategoryTextFile = "categ.txt";
if(file_exists($CategoryTextFile))
{ $fr = @fopen($CategoryTextFile,"r") or die("Open error:$CategoryTextFile");
}
else
{ die("Couldn't locate $CategoryTextFile");
}
$LineCounter1 = 0;
while(!feof($fr))
{ $LineReader = trim(fgets($fr, 4096));
if($LineReader != "")
{ $CategoryArray[$LineCounter1] = $LineReader;
$LineCounter1++;
} // end if loop
} // end while loop
fclose($fr);
?>
<HR align="center">
<H2><i>Classified</i></h2>
<table width="550" border="0" cellpadding="0" cellspacing="0" align="center" >
<?PHP
For ($r=0; $r<= $LineCounter1; $r++)
{ if( $ColOne == "" || $ColTwo == "" )
{ if($ColOne == "")
{ $ColOne = $CategoryArray[$r]; }
else
{ $ColTwo = $CategoryArray[$r]; ?>
<tr>
<td align="left" > <? print($ColOne); ?> </td>
<td align="left" > <? print($ColTwo); ?> </td>
</tr>
<?
$ColOne="";
$ColTwo="";
}// end else statement
} // end if statment
} // end for statment
?>
</table>
<HR align="center">
</body>