Mod Rewrite ... Help

Started on the old forum in February 2009 · view the original in the archive · old links redirect here

13 replies · 932 views · started 17 years ago · 1 min read

2 participants
Guest #1

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" /> </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.

looony Developer · 95 posts #2

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

<form action="page.php?private=$variable " method="post">

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

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

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

subzero Super moderator Fellow · 3,954 posts #3

I fixed the easy way to do this

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... _______…

Guest #4

QUOTE (subzero @ Feb 5 2009, 01:21 PM) <{POST_SNAPBACK}>

I fixed the easy way to do this

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>
";

I think you did not understand me. Loony that does not work.

I don'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't matter, i do not think its possible i will just make a redirection script.

subzero Super moderator Fellow · 3,954 posts #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... _______…

Guest #6

QUOTE (subzero @ Feb 5 2009, 01:39 PM) <{POST_SNAPBACK}>

You want links to work in a selete ?

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.

looony Developer · 95 posts #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

External image (may be gone)

if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }

subzero Super moderator Fellow · 3,954 posts #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... _______…

Guest #9

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

subzero Super moderator Fellow · 3,954 posts #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... _______…

Guest #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. 🙂

subzero Super moderator Fellow · 3,954 posts #12

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... _______…

Guest #13

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

subzero Super moderator Fellow · 3,954 posts #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... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close