SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    790
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    very elemental problem with PHP....



    Code:
    <form>
    	<input name="uid" action="test.php" method="post">
    	<input type="submit" value="send">
    </form>

    php:

    Code:
    <?php
    // trying both, for testing.... echo $_REQUEST['uid']; echo $_POST['uid'];
    ?>
    after submitting form it doesn't take me to test.php at all, it says in test.html, AND: what I put in text box shows up in query string, even though I'm sending the request as a post request....

    what am I missing?

    thank you......


  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,079
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    For testing, do a var_dump($_POST);

    You're declaring actino and method in the input rather than form. Also, let the browser know the input is text.

    Code HTML4Strict:
    <form action ="test.php" method="post">
        <input name="uid" type="text">
        <input type="submit" value="send">
    </form>

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    790
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    never mind... I figured it out...

    (why can't you remove your own posts in Sitepoint? other forums allow you to do this...)



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •