Closed Thread
Results 1 to 9 of 9

Thread: URL enconding problem

  1. #1
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    URL enconding problem

    Hi guys, I have a little problem in the URL encoding.

    The working URL should be this:
    Instead I have this:
    The problem is in this portion of code, but I can't find it and solve:
    Code:
    echo "Select Number of records per page: <form method=get action=$action_url>
    <select name=page=testlist.php&limit>
    <option value=10 $select10>10 Records</option>
    <option value=5 $select5>5 Records</option>
    <option value=2 $select2>2 Records</option>
    </select>
    <input type=submit value=GO>";
    Any hint please?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: URL enconding problem

    what is $action_url set to? I think that is your problem
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  4. #3
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    Re: URL enconding problem

    Sorry I forgot, $action_url is:

  5. #4
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: URL enconding problem

    your problem is here:
    Code:
    <select name=page=testlist.php&limit>
    This is falsy html. do this instead:

    Code:
    <select name="page=testlist.php&quot;limit">
    On the other hand, that is a non suitable name. even better would be:

    Code:
    <input type="hidden" name="page" value="testlist.php">
    <select name="limit">
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  6. #5
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    Re: URL enconding problem

    Finally done and finished!
    Fixed with the second method:
    <input type="hidden" name="page" value="testlist.php">
    <select name="limit">
    How can I live without this forum!?

    Thank you so much.

  7. #6
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    Re: URL enconding problem

    Sorry again
    But if I had to use also a mySQL query result and my URL has to be something like this:
    The "id", "id_nation" are two fields of a database mySQL.

  8. #7
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    Re: URL enconding problem

    I mean something like this (I know it's wrong, but just to explain what I meant):
    Code:
    <?
    $page_name 
    "es_ES";
    $id_nation = ($_POST['id_nation']);
    ?>
    <input type=hidden name=u value="<?php echo $page_name ?>" name1=id_nation value1="<?php echo $id_nation ?>">

  9. #8
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: URL enconding problem

    just do this?
    Code:
    <input type=hidden name=id_nation value="<?php echo $id_nation ?>">
    <input type=hidden name=u value="<?php echo $page_name ?>">
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  10. #9
    Thevenin is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    45
    Rep Power
    0

    Re: URL enconding problem

    Wonderful, I didn't think I could do it.
    Many thanks for you big help.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. If problem or cout problem?
    By chaoticape in forum C and C++
    Replies: 4
    Last Post: 06-10-2011, 10:29 AM
  2. C: Problem with solving problem
    By rakche in forum C and C++
    Replies: 15
    Last Post: 03-28-2010, 01:24 PM
  3. Replies: 0
    Last Post: 04-26-2007, 05:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts