Jump to content

Posting values from an input field


riavh

Recommended Posts

I am having trouble sending information that was entered into a form, on the same page to the next page.

 

I am sure i have done this a few years ago but cant find the code and cant find the answer online, hope someone can help me.

 

My code is as follows:

 

<form method="POST" action="https://.............. .asp ">

<table>

  <tr>

    <td>Name: </td>

    <td><input type="text" name="clientname" /></td>

  </tr>

  <tr>

    <td>E-mail:</td>

    <td><input type="text" name="email" /></td>

  </tr>

  <tr>

    <td>Contact No:</td>

    <td><input type="text" name="telno" /></td>

  </tr>

</table>

<?php

$udate = date("y-m-d H:i:s", strtotime ("+2 hour"));

$uniquevalue = "$udate" . " " . "Simpay Pro";

echo $uniquevalue;

?>

<br />

<input type="hidden" name="info1" value="<?php print $uniquevalue?>">

<input type="hidden" name="info2" value=$clientname>

<input type="submit" value="Submit">

</form>

 

So basically info1 is working i can see the value on the next page after its submitted, but info2 is the value of the input field.

 

Is this possible to do it like this, or do i have to send it to another page and then to my last page that displays the values?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.