# New to LoadVars, Confused with POST/GET

**URL:** <https://forum.kirupa.com/t/new-to-loadvars-confused-with-post-get/208902>\
**Category:** flash\
**Created:** [December 4, 2006, 4:44am UTC](https://forum.kirupa.com/t/new-to-loadvars-confused-with-post-get/208902 "2006-12-04T04:44:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hofuzz](https://avatars.discourse-cdn.com/v4/letter/h/48db29/32.png) [@Hofuzz](https://forum.kirupa.com/u/Hofuzz)\
**Post date:** [December 4, 2006, 4:44am UTC](https://forum.kirupa.com/t/new-to-loadvars-confused-with-post-get/208902/1 "2006-12-04T04:44:08Z")

</div>

Just getting my feet wet with LoadVars by passing variables to PHP with: (mysql on windows 03 server)

```auto
var myVars:LoadVars = new LoadVars();
myVars.id = 21;
myVars.hit = 99;
myVars.send("http://local/updateHit.php", "_self", "POST");

```

My PHP code:

```php
<?php
include_once("include/core.php"); /*DB connections, etc */

$id = $_POST["id"]; 
$hit = $_POST["hit"];  
$stmt = "UPDATE my_table SET hit = ". $db->Quote($hit) . " WHERE id = $id ";

if ( !$db->Execute($stmt))
    echo $db->ErrorMsg();
?>

```

However, test running this shows that flash is calling it as  
[http://localhost/updateHit.php?hit=99&id=21](http://localhost/updateHit.php?hit=99&id=21)  
so the script does not work unless I change the $\_POST to $\_GET (and that works) …umm I’m confused, I thought I specified “POST” in my AS?

Thanks.

Edit : Umm I realized I should be testing it in the browser :d:
