redirecting following form submition

Hi all,

I'm using zen pages for my portfolio.
I have some unpublished page where i store data for my customer, so they are not visible on the slidebar.
I'd like to create a redirecting page with a simple form submit where people will enter their name and be redirected to www.mydomain/pages/customername

i've just started with puting this code as a begining into the bloc code :

<form name="input" action="some url"
method="get">
Login :
<input type="text" name="user">
<input type="submit" value="Submit">
</form>

I don't know where to go to find help, your help will be really appreciated ;-)
Tks !

Comments

  • Well, you need a submit button and a script for "some url" that processes the form submission and does the redirection.
  • Hi Sbillard, Tks.

    i'm now with this code :

    `
    ">

    Votre nom :






    <?
    if(!empty($_POST['nom'])){
    header ("Location: http://www.mydomain.com/pages/.($_POST['nom'])");
    }else{
    echo '<h4>error';
    }
    ?>
    `
    I canno"t see where it's not working :s

  • acrylian Administrator, Developer
    Why don't you use a get form to use action to jump to a page?
  • There could be several things that are wrong, But it might help if you tell us what happens. Otherwise anything we say is just speculation.

    First, you cannot use the header redirection after a script has created any output.
    Second, `$_POST['nom']` may not exits thus throwing a PHP error.
    Third, `$_POST['nom']` might not be the permalink to the page.
Sign In or Register to comment.