Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8244727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:57:05+00:00 2026-06-07T21:57:05+00:00

I have a sample code: <?php $id = JRequest::getVar(‘id’); $action = index.php?option=com_test&id=.$id; ?> <form

  • 0

I have a sample code:

<?php
$id = JRequest::getVar('id');
$action = "index.php?option=com_test&id=".$id;
?>
<form action="<?php echo $action ?>" method="get">
<input type="text" name="id" value=""/>
<input type="submit" value="submit" name="submit" />
</form>

When I submit form is url is “index.php&id=...” => error can’t find component

How to fix it is result “index.php?option=com_test&id=...“

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:57:06+00:00Added an answer on June 7, 2026 at 9:57 pm

    JROUTE what is it?

    In your forum action, you should use the functionality from JRoute (The Component Router) to correctly route your URL in the framework to the component. JRoute::_('index.php?option=com_test&id=".$id');.

    Why?

    To avoid problems when a menu item is created via Menu Manager, your code will be incompatible (i.e. the error no component can be found will be displayed).

    Incompatible? what on earth do you mean?

    This would be because someone might of created a menu item index.php/myMenuItem/ which by joomla standards makes the default url ?option=com_test incompatible.

    How is Alias used in a URL?

    For a menu item, Joomla! uses the alias as the URL plug. Assume that you use the first two SEF URL options and you create a menu item called Products. Your URL would be example.com/products.

    Joomla! also uses the primary key values of data within the URL to help the router navigate to the correct page. Continuing with the previous example, if your products menu item was for an Article­/Category Blog, the link for the Article Title and/or Read More link would have three parts:

    • The menu item URL – example.com/products;
    • Plus, the primary key for the Category and the Category alias – 32-fruit;
    • Plus, the primary key for the Article and the Article alias – 1-apple;
      The complete URL is: http://example.com/products/32-fruit/1-apple

    Credit (JRoute, 2011)

    Implementation

    <?php
    $id = JRequest::getVar('id');
    $action = "index.php?option=com_test&id=".$id; ?>
    <form action="<?php echo JRoute::_($action); ?>" method="get">
    <input type="text" name="id" value=""/>
    <input type="submit" value="submit" name="submit" />
    </form>
    

    Other Examples..

    If you want to see how JRoute is implemented in other components a good place to look is in the views section on the administrator component com_menus. In the directory com_menus/views/items/tmpl/edit.php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code sample upload3.php: <html> <head> <title>PHP Form Upload</title> </head> <body>
I currently have this piece of code: NSString *strURL = [NSString stringWithFormat:@http://www.sample.com /phpFile.php?firstname=%@,txtfirstName.text]; NSString
I am using the sample code of paypal in php from https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code but whenever
I have a ajax.php file that contains the following sample code: switch($_REQUEST['request_name']) { case
I have a (sample) php code as follows : $name_Proc = chrome.exe; $wmi =
Text and sample code adapted from http://www.webdeveloper.com/forum/archive/index.php/t-65078.html , may not reflect actual question: I
I have a sample code: in default.php: <?php JHTML::_('behavior.mootools'); /* to load mootools */
i have already configured SMS gateway & some php code.Now my project is thatone
i have this simple code to load data from other php page using get
I have written simple code to get content from xml file to php. $xml

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.