javascript coding

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

is it possible to have a form on a site. fill it in and then have the results of the form be transported to a different form either on a local server or on the web server. basically transport infor from one form to another form.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Type a query into google. Submits a search and fills in the text box on the <b>different</b> page. So yes.....

You didn't ask <b>how</b>, so I was temped to leave that as my answer, but I'm not THAT pedantic lol.

POST (or GET) it to the new page and then use the POSTed variables as the intial values on the new form.

Code: [ Select ]
<input name="stuff" value="<?php echo($_POST['stuff']); ?>"></input>


As for different servers, I <i>think</i> so, but it might depend on the set up of the server, maybe someone else can clarify that?
  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

sobasically you are saying that the values of the first form can be posted to a databse then the next form can pull the values from the same database aswell as having fields of its own to be submuttied aswell? is that possible? or are you referring to something else. either way tell me the HOW

if the second form is on a local network server but not on the net is it possible to pull values that are on the net?
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Code: [ Select ]
<input type="text" name="stuff" value="<?php echo($_POST['stuff']); ?>"></input>


You just have that on the second page. The <b>value</b> of the text field "stuff" is created from the value of POSTed variable $_POST['stuff'], which in turn was created from the text field "stuff" on the first page.

Look just try it. Set up two identical forms in different files then post from one to the other, using the $_POST[] variables, submitted from the first form to fill in the second form.

No database, just use the basic variables.
  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

ok, not sure how to set it up. i have 2 forms that are identical. i have slotted the $_post[] php on the second file (recieve.php).

here is the code. tell me what i am doing wrong

send.htm (not sure if it should be php)
Code: [ Select ]
<body>
<form name="form1" id="form1" method="post" action="recieve.php">
 <table width="410" border="0">
  <tr>
   <td width="139">name</td>
   <td width="261"><input type="text" name="name" /></td>
  </tr>
  <tr>
   <td>salary</td>
   <td><input type="text" name="salary" /></td>
  </tr>
  <tr>
   <td>&nbsp;</td>
   <td><input type="submit" name="submit" value="submit" /></td>
  </tr>
 </table>
</form>
</body>
  1. <body>
  2. <form name="form1" id="form1" method="post" action="recieve.php">
  3.  <table width="410" border="0">
  4.   <tr>
  5.    <td width="139">name</td>
  6.    <td width="261"><input type="text" name="name" /></td>
  7.   </tr>
  8.   <tr>
  9.    <td>salary</td>
  10.    <td><input type="text" name="salary" /></td>
  11.   </tr>
  12.   <tr>
  13.    <td>&nbsp;</td>
  14.    <td><input type="submit" name="submit" value="submit" /></td>
  15.   </tr>
  16.  </table>
  17. </form>
  18. </body>


here is the php file
Code: [ Select ]
<body>
<form name="form1" id="form1" method="post" action="recieve.php">
 <table width="410" border="0">
  <tr>
   <td width="139">name</td>
   <td width="261"><input type="text" name="name" value="<?php $_POST['name'] ?>"/></td>
  </tr>
  <tr>
   <td>salary</td>
   <td><input type="text" name="salary" value="<?php $_POST['salary'] ?>"/></td>
  </tr>
 </table>
</form>
</body>
  1. <body>
  2. <form name="form1" id="form1" method="post" action="recieve.php">
  3.  <table width="410" border="0">
  4.   <tr>
  5.    <td width="139">name</td>
  6.    <td width="261"><input type="text" name="name" value="<?php $_POST['name'] ?>"/></td>
  7.   </tr>
  8.   <tr>
  9.    <td>salary</td>
  10.    <td><input type="text" name="salary" value="<?php $_POST['salary'] ?>"/></td>
  11.   </tr>
  12.  </table>
  13. </form>
  14. </body>
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

http://www.caffeinefuelled.net/richard- ... s/send.htm

recieve.php: (spot the difference ;) - its in the php tags)
Code: [ Select ]
<body>

<form name="form1" id="form1" method="post" action="recieve.php">
 <table width="410" border="0">
  <tr>
   <td width="139">name</td>
   <td width="261"><input type="text" name="name" value="<?php echo($_POST['name']) ?>"/></td>
  </tr>
  <tr>
   <td>salary</td>
   <td><input type="text" name="salary" value="<?php echo($_POST['salary']) ?>"/></td>
  </tr>
 </table>
</form>
</body>
  1. <body>
  2. <form name="form1" id="form1" method="post" action="recieve.php">
  3.  <table width="410" border="0">
  4.   <tr>
  5.    <td width="139">name</td>
  6.    <td width="261"><input type="text" name="name" value="<?php echo($_POST['name']) ?>"/></td>
  7.   </tr>
  8.   <tr>
  9.    <td>salary</td>
  10.    <td><input type="text" name="salary" value="<?php echo($_POST['salary']) ?>"/></td>
  11.   </tr>
  12.  </table>
  13. </form>
  14. </body>
  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

lol. i forgot to echo the $_post variables. LOL. good it works. now i would like to add a reference number in there. a sequential reference number. i suppose that would mean that it needs to be linked to a database so it would have something to reference. all it needs is to be sequential. i would also like the facility of flicking thru the forms which are unique purely by the reference number. i suppose that is a harder job to accomplish

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 57 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.