Hello everybody,
I'm new to php and wrote my own classified script but ran into a problem that i cant seem to resolve.
basically i have the categorys displayed and what i want is to have a visite click on the category and display the available options within the categor after clearing the curent content of the page. i already have the code to display the category info but cann't seem to get the code to run the function..the problem area is the clicking on a category.
http://www.comgen.ca/phptest/mainclas.php
else
{ $info2 = $category1;
$category_num2 = $info_array1[$x][1];
?>
<span class="class1">
<tr>
<td align="right" width="3%" ><img src="bullet.gif"></td>
<td align="left" width="20%"> <FONT SIZE=3><Strong>
<!-- // echo "$info1 ($category_num1)";-->
//PROBLEM AREA
<a href="<?php echo"$PHP_SELF?cat=$info1";?>"> <? echo"$info1 ($category_num1)"; ?></a>
</strong></FONT></td>
<td align="right" width="3%"><img src="bullet.gif"></td>
<td align="left" width="20%"> <FONT SIZE=3><STRONG> <a href="<?PHP echo"$PHP_SELF?cat=$info2";?>"> <?PHP echo "$info2 ($category_num2)"; ?></STRONG></FONT> </td>
</tr> </span><?PHP
$info1="";
$info2="";
}// closing the else statement
the function testone($cat) // code should be displayed in a new screen
{ echo "testone";}
any help you can give me would be greatly appreciated.. its been 2 weeek that i been tring to fix this problem. thanks everybody
need help with a script i'm writing please help
Moderator: General Moderators
what?
i went there and it seems that the script is werkin fine. ok i dont know if you can run a function directly off a link, but you can make a link activate a case activate a function:
Code: Select all
<a href="?action=function">activate function</a>
<?php
function function($text)
{
echo $text;
}
if (empty($_GETї'action']))
{
$_GETї'action'] = 0;
}
$action = $_GETї'action'];
switch($action)
{
case "function":
$yo = "whatever";
function($yo);
break;
}