I am not very good in PHP. My problem is : I try to pass parameter from href but it seem not working. Here is my code :
<a href="?f=history/index" class="link_leftmenu" onMouseOver="window.status='History'; return true;" onMouseOut="window.status=''; return true;">History</a><br> <br>
<?
echo "f is $f <br>";
if (!$f) $f = "index";
echo "f is $f";
include("../content/$f.php");
?>
The first echo always return null value which my page cannot refer to ../content/history/index.php
Please help. It was working before and recently it seems not working anymore.
regards,
Ujang
parsing parameter problem
Moderator: General Moderators
You're probably learning from an old book or an old tutorial.
try
try
Code: Select all
<?php
if ( !isset($_GET['f']) ) {
echo 'get parameter f not set';
}
else {
echo 'f: ', $_GET['f'];
}
?>php parsing problem
Thank You very much Mr volka.
My problem have been solve.
My website : http://www.rowing.org.my have working as usual.
Thanks also to DevNetwork Forums
regards,
Ujang
My problem have been solve.
My website : http://www.rowing.org.my have working as usual.
Thanks also to DevNetwork Forums
regards,
Ujang