Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 131,736 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,185 people online right now. Registration is fast and FREE... Join Now!




Form data not getting posted

 
Reply to this topicStart new topic

Form data not getting posted, Probably a simple mistake

swichnz
post 10 Oct, 2008 - 06:00 PM
Post #1


New D.I.C Head

*
Joined: 5 Sep, 2006
Posts: 17


My Contributions


I have been lookig at this problem for a few hours and I have no idea what would cause it.

This is all part of a much bigger php page but it is an .asp file that is added to the page with an include statement, my understanding is that this shouldn't have any effect on the page compared to if it was all part of one php file.

The php at the top is just a testing method but I can't work out for the life of me why the code doesn't work when the page reloads after clicking on the submit button. This is not even entering the if statement because the echo never occurs, which implies there is nothing being posted.


CODE


<div  class="LeftMenu">
    <?php
        if(isset($_POST['emailSignIn'])){
        echo "email is = " . $_POST['emailSignIn'];    
        }
    ?>
        <br />
             Sign In
            
             <font size="-6">    
    
<!-- This is all the stuff down the menu on the lefthand side -->      
            
            <form name "signInForm" action="<?php echo $_SERVER['PHP_SELF']; ?>">
                Email Address<br />    
                <input type="text" name="emailSignIn"/><br /><br />    
                Password<br />
                <input type="password" name="passwordSignIn"/>
                <br /><br />    
                <p align="center"><input type="submit" name="SignInSubmit" value="  Login  "/></p>
            </form>
            
            </font>            
            <A href="Register.php"> Register Here </A>
</div>


Any help would be greatly appreciated.
User is offlineProfile CardPM

Go to the top of the page

kyrotomia
post 10 Oct, 2008 - 06:37 PM
Post #2


New D.I.C Head

*
Joined: 5 May, 2007
Posts: 45



Thanked 1 times
My Contributions


I suggest you have a look at the way you SEND and read data from your form. You can either send data as POST or GET. However you did not specify one and you suppose you'll get it as POST.

try replacing your form tag with this :
CODE

<form name "signInForm" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >


Let me know if this was the problem!

This post has been edited by kyrotomia: 10 Oct, 2008 - 06:38 PM
User is offlineProfile CardPM

Go to the top of the page

swichnz
post 10 Oct, 2008 - 06:58 PM
Post #3


New D.I.C Head

*
Joined: 5 Sep, 2006
Posts: 17


My Contributions


QUOTE(kyrotomia @ 10 Oct, 2008 - 07:37 PM) *

I suggest you have a look at the way you SEND and read data from your form. You can either send data as POST or GET. However you did not specify one and you suppose you'll get it as POST.

try replacing your form tag with this :
CODE

<form name "signInForm" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >


Let me know if this was the problem!



Yeh that was it, thank you so much.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 10:54AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month