By linuxdee on
dear sir:
I'd like to now how I can pass variables like this... I have a site that had pages called like this, but with drupal, it doesn't work.
Say I want a=1...9, to be passed on to self page with PHP code in it (so that the PHP code can use 'a');
my programe structure is :
if(a=1){
//do list the detail table raw0.1
}else{
_______________________ _________
<a href="list.php?a=0">raw0.0</a>|<a href="list.php?a=1">raw0.1</a>|<a href="list.php?a=2">raw0.2</a>|...|<a href="list.php?a=9">raw0.9</a>
_______________________ __________
}
This doesn't work however...
Who has the solution?
thanks
cnleedee
Comments
READ D6/D7 page_example and menu_example, I had made it ok!
READ D6/D7 page_example, I had made it ok!
just read the following:
function page_example_description() {
return array('#markup' => t('The page_example provides two pages, "simple" and "arguments". The simple page just returns a renderable array for display. The arguments page takes two arguments and displays them, as in @arguments_link', array('@simple_link' => url('examples/page_example/simple', array('absolute' => TRUE)), '@arguments_link' => url('examples/page_example/arguments/23/56', array('absolute' => TRUE)))));
}
and
function page_example_arguments($first=0, $second=0) {
// Make sure you don't trust the URL to be safe! Always check for exploits.
if (!is_numeric($first) || !is_numeric($second)) {
// We will just show a standard "access denied" page in this case.
drupal_access_denied();
return; // We actually don't get here.
}
$list[] = t("First number was @number.", array('@number' => $first));
$list[] = t("Second number was @number.", array('@number' => $second));
$list[] = t('The total was @number.', array('@number' => $first + $second));
$render_array['page_example_arguments'] = array(
'#theme' => 'item_list', // The theme function to apply to the #items
'#items' => $list, // The list itself.
'#title' => t('Argument Information'),
);
return $render_array;
}
Use equality operator, not assignment operator
Hi,
Actually not all folks who know how to answer questions are men :) Women know things also ?
The Leprechaun's sister advises, use the equality operator :
if (a==1) {