Mod Rewrite ... Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mod Rewrite ... Help

    ok i have the chatroom page...

    mysite.com/chat/

    on this page i have the links to

    mysite.com/chat/general
    mysite.com/chat/teens

    with teens and general both being chatrooms.

    Now..

    what i want is a form on mysite.com/chat that will allow a private chatroom ...

    <form action="i dont know " method="post">


    Private Room: <input type="text" name="room" value="" maxlength="15" />

    <input type="submit" />
    </p>
    </form>

    What would I put in form action? Or do I HAVE to make a simple redirect script.. i.e Will just pass the variable post to a page that will sort out the right url for me.

    I Hope this makes sense.

    #2
    hmmmm try
    add the variable to the form then use the $_REQUEST to call the variable from the url and form so.

    Code:
    <form action="page.php?private=$variable " method="post">
    
    
    Private Room: <input type="text" name="room" value="" maxlength="15" />
    
    <input type="submit" />
    </p>
    </form>

    Comment


      #3
      I fixed the easy way to do this

      Code:
      echo "<form action=\"What-php.php\" method=\"post\">";
      echo "<input  name=\"room\" value=\"$room\" maxlength=\"20\"/>
      ";
      echo " <input type=\"submit\" value=\"SUBMIT\"/>|<input type=\"reset\" value=\"RESET\"/> 
      ";
      
      echo "<input type=\"hidden\" name=\"action\" value=\"Where\"/>";
      echo "</form>
      ";
      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
      Visit: WapMasterz Coming Back Soon!
      _______
      SCRIPTS FOR SALE BY SUBZERO
      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #4
        <div class='quotetop'>QUOTE (subzero @ Feb 5 2009, 01:21 PM) <{POST_SNAPBACK}></div>
        I fixed the easy way to do this

        Code:
        echo "<form action=\"What-php.php\" method=\"post\">";
        echo "<input  name=\"room\" value=\"$room\" maxlength=\"20\"/>
        ";
        echo " <input type=\"submit\" value=\"SUBMIT\"/>|<input type=\"reset\" value=\"RESET\"/> 
        ";
        
        echo "<input type=\"hidden\" name=\"action\" value=\"Where\"/>";
        echo "</form>
        ";
        [/b]
        I think you did not understand me. @Loony that does not work.

        I don&#39;t think what I want to do is possible.

        Imagine this

        [myinputboxishere]privateroom[endinputbox]
        [submit]

        when i enter privateroom into the input box i want the url im going to, to be mysite.com/chat/WHATEVERIHAVEINPUTTED

        It don&#39;t matter, i do not think its possible i will just make a redirection script.

        Comment


          #5
          You want links to work in a selete ?
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            <div class='quotetop'>QUOTE (subzero @ Feb 5 2009, 01:39 PM) <{POST_SNAPBACK}></div>
            You want links to work in a selete ?[/b]
            Look at this url you should get an idea of what i mean http://kyle-young.com/chat/

            Notice where the first two links go to. That is the same sort of thing I want the input to go to.

            Comment


              #7
              i have something like this on my site the navi input i just used a redirect to do it but im sure there would be a better way to do it

              Comment


                #8
                cut out chat/ try ../chat/
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  Lol, no that won&#39;t work. I know the <form action="chat/" is wrong just now. Don&#39;t worry im just going to make a redirection script. Bare in mind there is no /chat/general/ folder on my server. It doesn&#39;t exist. Mod_Rewrite just makes you think there is.

                  Comment


                    #10
                    i know how to mod things
                    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                    Visit: WapMasterz Coming Back Soon!
                    _______
                    SCRIPTS FOR SALE BY SUBZERO
                    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                    _______
                    Info & Tips
                    php.net
                    w3schools.com

                    Comment


                      #11
                      Yeah sorry. Anyway I got it working with a redirect script but if anyone knows how to do one without the redirect that would be great.

                      Comment


                        #12
                        http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

                        Learn the hard way lol
                        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                        Visit: WapMasterz Coming Back Soon!
                        _______
                        SCRIPTS FOR SALE BY SUBZERO
                        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                        _______
                        Info & Tips
                        php.net
                        w3schools.com

                        Comment


                          #13
                          LoL... too much time reading and too little implentation.

                          Comment


                            #14
                            Well have to learn the hard way to get it right i had too
                            Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                            Visit: WapMasterz Coming Back Soon!
                            _______
                            SCRIPTS FOR SALE BY SUBZERO
                            Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                            FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                            _______
                            Info & Tips
                            php.net
                            w3schools.com

                            Comment

                            Working...
                            X