Jump to content

[SOLVED] Problem updating


dark22horse

Recommended Posts

Hi guys,

 

Just trying a simple update form, but its not working. 

 

Parse error: syntax error, unexpected T_VARIABLE, expecting ']' in C:\Program Files\xampp\htdocs\Poker\uploader3.php on line 26

 

<html>
<head>
    <title>Uploaded</title>

</head>
<body style="margin:0;">

<?
require_once("mysql_config.php");

   $id = $_POST['id'];
   $name=$_POST['name'];
   $nickname=$_POST['nickname'];
   $first=$_POST['first'];
   $second=$_POST['second'];
   $buy_in=$_POST['buy_in'];
   $won=$_POST['won'];   
   $profit_loss=$_POST["profit_loss"];
   $played=$_POST['played'];
   $win_ratio=$_POST['win_ratio'];
   $top_2_ratio=$_POST['top_2_ratio"];
   $average_return=$_POST["average_return"];  
     

**problem here **
$sql_string = "UPDATE player SET name='$name', nickname='$nickname', first='$first', second='$second', buy_in='$buy_in', won='$won', profit_loss='$profit_loss', played='$played', win_ratio='$win_ratio', top_2_ratio='$top_2_ratio', average_return='$average_return'"." WHERE id='$id'";

mysql_query($sql_string) OR die(mysql_error());


$ok = mysql_query($sql_string);


if($ok){
	echo "<h2>all is good, upload another</h2>";
} else {
	echo "<h2>check the string".$sql_string."</h2>";
}







?>

<a href="update.php"> Click here to update another player</a>


</BODY>
</html>

Link to comment
https://forums.phpfreaks.com/topic/68918-solved-problem-updating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.