Jump to content

How to Post a form to a List document


silentg0d

Recommended Posts

Hello, I'm not looking to learn alot of PHP right now but i am learning enough to get done what needs to be done. I need to no how to make a list document that gets and posted form from a different document and puts it into a list, All help is much appreciated. heres my form from my input.htm

 

<form action="list.htm" method="post" >
  Armor Set ID(Head Piece): 
  <input type="text" name="head"/><br>
  Armor Set ID(Chest Piece):
  <input type="text" name="chest"/><br>
  Armor Set ID(Arm Piece): 
  <input type="text" name="arm" /><br>
  Armor Set ID(Leg Piece):
  <input type="text" name="leg" /><br>
  Armor Set ID(Feet Peice):
  <input type="text" name="feet" /><br><br>
  <input type="submit" />
</form>

Link to comment
https://forums.phpfreaks.com/topic/41883-how-to-post-a-form-to-a-list-document/
Share on other sites

sorry i could not edit the code box covered the edit button, so i have to double post.

 

Ive cleaned up my form heres the remake don't no if it matters

 

<form action="list.htm" method="post" >
<table border="1">
<tr>
  <td>Armor Set ID(Head Piece): </td>
  <td><input type="text" name="head"/></td>
</tr>
<tr>
  <td>Armor Set ID(Chest Piece):</td>
  <td><input type="text" name="chest"/></td>
</tr>
<tr>
  <td>Armor Set ID(Arm Piece):</td>
  <td><input type="text" name="arm" /></td>
</tr>
<tr>
  <td> Armor Set ID(Leg Piece):</td>
  <td><input type="text" name="leg" /></td>
</tr>
<tr>
  <td>Armor Set ID(Feet Peice):</td>
  <td><input type="text" name="feet" /></td>
</tr>
<tr>
  <td></td>
  <td><input type="submit"  /></td>
</tr>
</table>
</form>

 

so you want whatever is submitted in your form to be listed on another page? just do this:

 

<?php

echo $_POST['head'] . "<br>";
echo $_POST['head'] . "<br>";
echo $_POST['chest'] . "<br>";
echo $_POST['arm'] . "<br>";
echo $_POST['leg'] . "<br>";
echo $_POST['feet'];

?>

 

with a table if you want of course...hopefully this is what you were asking for (half asleep)

Archived

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

×
×
  • Create New...

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.