0

hi guys, well i am using .htaccess in my website to make SEO friendly urls..
the urls are supposed to look like this:
http://localhost/home
or
http://locahost/singup

it is working nicely.. the problem is when i came to makin forms..
how should i submit my forms??
the .htaccess takes all the requests as a files and redirects all the calls to index.php
here is my .htaccess file that i made:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [L]

and here is my form:

<u><center><h1>Sign Up!</h1></center></u>

                    <form method="post" action="signup/process/">
                        <label for="Name">First Name:</label>
                        <input type="text" name="Name1" id="Name" />

                        <label for="Name">Last Name:</label>
                        <input type="text" name="Name2" id="Name2" />

                        <label for="City">Email:</label>
                        <input type="email1" name="Email" id="Email" />
                        <label for="City">Re-enter Email:</label>
                        <input type="email2" name="Email2" id="Email2" />
                        <label for="Email">New Password:</label>
                        <input type="password" name="Password" id="Password" />
                        <label for"I am">I am:</label> 
                        <select name="iam" id="select" style="height: 50px;">
                            <option id ="select">Male</option>
                            <option id="select">Female</option>
                        </select>
                        <label for="birthday">Birthday</lable>
                            <table>
                                <tr><td><select name="bday" id="select_small">
                                            <option>Day:</option>
                                            <option>1</option>
                                        </select></td>
                                    <td>
                                        <select name="bmonth" id="select_small">
                                            <option>Month:</option>
                                            <option>January</option>
                                        </select>
                                    </td>
                                    <td><select name="byear" id="select_small">
                                            <option id ="select">Year:</option>
                                            <option id="select">1990</option>
                                        </select>
                                    </td>
                                </tr>

                            </table>


                            <input type="submit" name="submit" value="Submit" class="submit-button" />
                    </form>



                </div>
            </div>

so please tell me what is wrong with my code above??
whenever i submit something, the url looks as follows:
http://localhost/A-zone/%3C?php%20$url%20=%20$_SERVER[%27HTTP_HOST%27];%20echo%20$url;%20?%3E

it torally doesn't make sense to me! please tell me wt to do...
thanks to anyone who tries to help me..

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Awah Mohamed
0

I'd send the form to signup.php and then redirect back to your modified url page. No need to send form through index.php

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.