Jump to content

[SOLVED] Parse error: syntax error, unexpected T_VARIABLE


DanPri

Recommended Posts

Hi Guys

 

I know this is a regular question but i have seached everywhere for the answear.

 

I get this error :

 

Parse error: syntax error, unexpected T_VARIABLE on line 13

 

<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$nick_name = $_POST['nick_name'];
$ass = $_POST['ass'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$from = $_POST['from'];

mysql_connect ("localhost", "cwreaves_fd", "fd") or die ('Error: ' . mysql_error());
mysql_select_db ("cwreaves_fd")

[b]$query = "INSERT INTO fighter_info(first_name, last_name, nick_name, ass, height, weight, from) VALUES ('$first_name','$last_name','$nick_name','$ass','$height','$weight','$from')";[/b]

mysql_query($query) or die ('Error updating Database');

echo "Database updated with: ".$id."".$first_name."".$last_name." ;

?>

if any one can help I would be very greatfull

Here it is

 

<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$nick_name = $_POST['nick_name'];
$ass = $_POST['ass'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$from = $_POST['from'];

mysql_connect ("localhost", "cwreaves_fd", "fd") or die ('Error: ' . mysql_error());
mysql_select_db ("cwreaves_fd");

[b]$query = "INSERT INTO fighter_info(first_name, last_name, nick_name, ass, height, weight, from) VALUES ('$first_name','$last_name','$nick_name','$ass','$height','$weight','$from')";[/b]

mysql_query($query) or die ('Error updating Database');

echo "Database updated with: ".$id."".$first_name."".$last_name." ;

?>

<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$nick_name = $_POST['nick_name'];
$ass = $_POST['ass'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$from = $_POST['from'];

mysql_connect ("localhost", "cwreaves_fd", "fd") or die ('Error: ' . mysql_error());
mysql_select_db ("cwreaves_fd");

$query = "INSERT INTO fighter_info(first_name, last_name, nick_name, ass, height, weight, from) VALUES ('$first_name','$last_name','$nick_name','$ass','$height','$weight','$from')";

mysql_query($query) or die ('Error updating Database');

echo "Database updated with: ".$id." ".$first_name." ".$last_name;

?>

 

Try this, if this doesn't work, then you must have gave us the wrong code.

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.