Redirection based on user input?

Hello!

I am new here and I need some PHP related help!

What I want to do is to have a page where a user can enter a certain digit, 1 up to around 140, sometimes the number gets larger, and have them redirected based on the number they entered. It would be very nice to be able to have “Redirecting please wait” pages like in vBulletin upon login… But not absolutely needed.

So far I have this for my html:


<form action="example.php">
<p>world # <br />
<input name="example_num" type="text" id="example_num" maxlength="3" />
<br />
<input type="image" value="Submit" src="images/enter.gif" />
</p>
</form>

But I have no idea what I should put for my PHP code. I want, lets say, if the user enters the number 132, for the user to be redirected to /examples/example-132.html, or maybe for the URL to be example.php?example=132 and have it show the page /examples/example-132.html…

Can anyone please help me out? I’m sure this is very simple to do if you know how to :P!

EDIT: I would also prefer not to use a database…