Jump to content

Archived

This topic is now archived and is closed to further replies.

turbocueca

My submit form doesnt work

Recommended Posts

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:

[code]<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>
[/code]

insert.php:

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
you have 2 forms with on submit try this

[code]

<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>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.