Forum Moderators: coopster

Message Too Old, No Replies

storing a variable

         

RogueDogg

12:11 am on Jul 6, 2006 (gmt 0)

10+ Year Member



Is it possible to store a variable such as a unique ID for a person and then recall that into a textarea?

Example:

<text area name="exmaple" cols="50" rows="5"> here is the customer ID <? echo "$cid";?> </textarea>

I tried setting this in phpmyadmin and when I call this field it just outputs as plain text just as you see it. Am I doing something wrong?

eelixduppy

12:47 am on Jul 6, 2006 (gmt 0)



Try this instead:

echo '<textarea name="exmaple" cols="50" rows="5"> here is the customer ID '.$cid.'</textarea>';

Good luck on your project. Hope it's coming along well ;)

mrWoot

2:03 am on Jul 6, 2006 (gmt 0)

10+ Year Member



Once the form has been posted, you can do:

<?php
$example = $_GET['example'];
?>
<textarea id="example" name="example" cols="50" rows="5">Here is the customer ID: <?php echo $example;?></textarea>

RogueDogg

5:47 am on Jul 6, 2006 (gmt 0)

10+ Year Member



Welcome back from your "vacation": eelixduppy

I have made some progress, I will wait for an answer to this when I catch you on AIM.