Jump to content

echoing text from a text field


denco10

Recommended Posts

Ive searched all over but i fear that I'm using the wrong search phrase .

what I'm trying to do is retrieve the text from a text field in a form and dynamically

display it in a frame below. I have used java to do something similar with an image

but I'm sure i can do this using php just not sure how. Any help is appreciated .

Link to comment
https://forums.phpfreaks.com/topic/158203-echoing-text-from-a-text-field/
Share on other sites

Do you mean something simple like this?

 

<form action="" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="6">
  <tr>
    <td width="40%"><input type="text" name="test" id="test" /></td>
    </tr>
  <tr>
    <td><input type="submit" name="submit" id="submit" value="Submit" /></td>
    </tr>
  <tr>
    <td> </td>
    </tr>
  <tr>
    <td>
<?php
    if(isset($_POST['submit'])){
	echo $_POST['test'];
	}
?>
        </td>
    </tr>
</table>
</form>

I actually just broke down and scripted java ugh

<script type="text/javascript" src="scripts/textover.js"></script>

 

<td><input type="hidden" name="on2" value="Your Name" />
    Your Name
      <textarea name="os2" class="createinput" onfocus="if(this.value=='Type your name and hit tab to 
preview')this.value='';" onblur="if(this.value=='')this.value='Type your name and hit tab to preview';" 
onchange="CamsTagPre()" rows="1">Type your name and hit tab to preview</textarea></td>

 

<th scope="col" id="bgimgrt" height="105"><div id="previewtag" align="left" style="font-size: 50px; 
font-weight: normal; font-family: arial; color: rgb(255, 255, 255);"><nobr>Your Name</nobr></div>
</th>

if anyone else needs to do this let me know ill send you the simple lil script

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.