# Someone help me... I have problem with sending data to my mysql table

**URL:** <https://forum.kirupa.com/t/someone-help-me-i-have-problem-with-sending-data-to-my-mysql-table/115705>\
**Category:** Uncategorized\
**Created:** [July 11, 2004, 1:44am UTC](https://forum.kirupa.com/t/someone-help-me-i-have-problem-with-sending-data-to-my-mysql-table/115705 "2004-07-11T01:44:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berone](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Berone](https://forum.kirupa.com/u/Berone)\
**Post date:** [July 11, 2004, 1:44am UTC](https://forum.kirupa.com/t/someone-help-me-i-have-problem-with-sending-data-to-my-mysql-table/115705/1 "2004-07-11T01:44:44Z")

</div>

\<?  
session\_start();  
$conn = mysql\_connect(“XXX”, “XXX”, “XXX”);  
mysql\_select\_db(“XXX”,$conn);

if ($\_POST[‘score’]) {  
$score = $\_POST[‘score’];  
}  
print “status=Finished”;

$sql = “select \* from XXX where user\_name = ‘XXX’”;  
$sql\_res = mysql\_query($sql,$conn) or die(mysql\_error());  
srand ((float) microtime() \* 10000000);  
while ($stats = mysql\_fetch\_array($sql\_res)) {  
$gold = $stats[‘cash’];

}

$gold = $gold + $score;

$q = “update usergame set cash = ‘$gold’ where user\_name = ‘$HTTP\_SESSION\_VARS[user\_name]’”;  
mysql\_query($q);

?\>

$gold outputs as 0  
$score which is the score from the flash game works!  
cash is updated to the same as score… because $gold doesn’t register!  
help i donno why this does htis
