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

Link to comment
Share on other sites

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." ;

?>

Link to comment
Share on other sites

<?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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.