Jump to content


Photo

My submit form doesnt work


  • Please log in to reply
2 replies to this topic

#1 turbocueca

turbocueca
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts

Posted 25 March 2006 - 11:55 PM

I'm learning to do php forms, and I'm testing in this page: [a href=\"http://infocenter.awardspace.com/submit.php\" target=\"_blank\"]http://infocenter.awardspace.com/submit.php[/a] , it should return the value written on the "Game Name" textbox when clicking OK but it doesn't.


submit.php:

<td width="111"><strong>Game Name:* </strong></td>
    <td width="319"><form id="form3" name="form3" method="post" action="">
      <label>
        </label>
      <input name="textfield3" type="text" size="53" maxlength="45" />
    </form>    </td>

(...)

<form id="form6" name="form6" method="post" action="insert.php">
  <label></label>
  <div align="center">
    <p>
      <input type="submit" name="Submit" value="OK" />
    </p>
    <p><a href="index.php">Back</a></p>
  </div>
</form>

insert.php:

<?php    echo $_POST['textfield3']; ?>


#2 azuka

azuka
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts
  • LocationNigeria

Posted 26 March 2006 - 01:16 AM

From your code, you have two different forms -- one with the textbox and the other with a submit button -- ie form3 and form6. You need to join them.

Given enough eyeballs all bugs are shallow. My Website

#3 shortj75

shortj75
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 26 March 2006 - 07:46 AM

you have 2 forms with on submit try this


<td width="111"><strong>Game Name:* </strong></td>
    <td width="319"><form id="form3" name="form3" method="post" action="insert.php">
      <label>
        </label>
      <input name="textfield3" type="text" size="53" maxlength="45" />
    </form>    </td>

(...)


  <label></label>
  <div align="center">
    <p>
      <input type="submit" name="Submit" value="OK" />
    </p>
    <p><a href="index.php">Back</a></p>
  </div>
</form>

The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users