# \[PHP\]- Adding variables to textboxes

**URL:** <https://forum.kirupa.com/t/php-adding-variables-to-textboxes/98909>\
**Category:** Uncategorized\
**Created:** [January 12, 2004, 8:03pm UTC](https://forum.kirupa.com/t/php-adding-variables-to-textboxes/98909 "2004-01-12T20:03:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 12, 2004, 8:03pm UTC](https://forum.kirupa.com/t/php-adding-variables-to-textboxes/98909/1 "2004-01-12T20:03:43Z")

</div>

Hey yall, it’s me, back with another simple, yet annoying problem with php.

I need to pass a varaible to a hidden field textbox. Yes, yes laugh it up 🙂

```php

<?php
$userIPAddress = $_SERVER["REMOTE_ADDR"]  
?>

```

Then in my html form i have my input type  
edit: I know why this isn’t working but I don’t know where to wrap the \<?php ?\> tags.

```php

  <input name="userIPAddress" type="hidden" id="userIPAddress">

```

I tried a bunch of stuff but I get the text “userIPAddress” in my database instead of the value.

Thanks, and sorry for yet again another silly php question 🙂
