# URGENT: Updating a database!

**URL:** <https://forum.kirupa.com/t/urgent-updating-a-database/181481>\
**Category:** programming\
**Created:** [March 9, 2006, 5:53pm UTC](https://forum.kirupa.com/t/urgent-updating-a-database/181481 "2006-03-09T17:53:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyler](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skyler](https://forum.kirupa.com/u/skyler)\
**Post date:** [March 9, 2006, 5:53pm UTC](https://forum.kirupa.com/t/urgent-updating-a-database/181481/1 "2006-03-09T17:53:23Z")

</div>

HERES MY CODE

```php

<?php 

//variables from first page
//number Price
   $num1 = $_POST['num1'];

//update function
$query = "UPDATE price SET 1ft = '$num1' WHERE id = '1'";
   
   echo'<a href="../admin">GO BACK</a>';
   
?>

```

Its taking functions from the first page.

This should work… shouldnt it?

If not, does anyone have suggestions? I really need this.
