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 7784535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:06:37+00:00 2026-06-01T20:06:37+00:00

so i have a form at sampleform.html which accepts user’s value [This is a

  • 0

so i have a form at sampleform.html which accepts user’s value [This is a number chosen from a dropdown menu. The number is the id of a ward]

This number is passed onto index.php through the GET method. Now, on index.php, the user sees details related to the number he chose (from a mysql database) and he has two links to choose from:

  1. Lorry routes
  2. Tricycle routes

I want to pass a new variable ‘route=lor’ or ‘route=tri’ through a hyperlink url and also the original ward number from sampleform.html to a new page – route.php through index.php

I tried $_SESSION on index.php, where $_SESSION[‘wardno’] accepts the $_GET[‘wno’] value from sampleform.html. But I’m not able to see any output on route.php when i call $_SESSION[‘wardno’].

How do i pass this variable from sampleform.html, through index.php and to route.php after clicking on one of the two hyperlinks on index.php??

I’m seeing no syntax errors. Will put up the code if you guys don’t understand the question.

Help is appreciated. Thanks in advance,

Kaushik

  • 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-01T20:06:39+00:00Added an answer on June 1, 2026 at 8:06 pm

    Include the names and values of whatever GET query variables you want to pass on through index.php in the href attributes of the two hyperlinks.


    Code snippet #1

    <?php
        function getparams() {
            foreach ($_GET as $k => $v)
                $r .= htmlspecialchars(urlencode($k)) . '=' .
                      htmlspecialchars(urlencode($v)) . '&';
            return $r;
        }
    ?>
    <a href="route.php?route=lor&<?php echo getparams(); ?>">link 1</a>
    <a href="route.php?route=tri&<?php echo getparams(); ?>">link 2</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that looks like this: class SampleForm(forms.Form): text = forms.CharField(max_length=100) In
I have form, which i dont want the user to see it. Dont ask
I have form which is opened using ShowDialog Method. In this form i have
I have form with user defined filters ( combobox with column names, combobox with
i have form action file in another directory but some file send to this
I have form where user submits field. Field can have letters, numbers, and punctuation.
I have form like this: <input type='text' name='people' id='namepeople'> <input type='hidden' name='idpeople' id='idpeople'> <input
I have form called LoginForm, which extends the RecipeForm which in turn extends Zend_Form.
I have: form.input :duration, as: select, collection: {} I need: <option value= data-price=XXX></option> Rails
I have form and form text field which generates dynamically using JSP. And I'm

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.