Jump to content

Parse Error: Syntax Error, Unexpected T_While ?help?


Hypersource

Recommended Posts

Heres the error:

 

Parse error: syntax error, unexpected T_WHILE in ****/*/*.php on line 17

 

The code:

 

 

<?PHP

include 'connect.php';

 

$tik=$_SESSION['user_name'];

$amount= $_POST['amount'];

if($amount)

{

$user= MYSQL_QUERY("SELECT * FROM users WHERE user_name='$tik'")or die(mysql_error);

 

WHILE($row=MYSQL_FETCH_ARRAY($user))

{

$club=$row['club'];

$cash=$row['cash'];

}

$c= MYSQL_QUERY("SELECT * FROM club WHERE name='$club' ")or die(mysql_error);

 

WHILE($row=MYSQL_FETCH_ARRAY($c))//Problem Line

{

$till=$row['till'];

$owner=$row['$owner'];

}

$till=$till+$amount;

$cash=$cash-$amount;

if($amount > 0 AND $cash > 0)

{

$epic=mysql_query("UPDATE club SET till='$till' WHERE name='$club'") or die(mysql_error());

$epic=mysql_query("UPDATE users SET cash='$cash' WHERE user_name='$tik'") or die(mysql_error());

header( 'Location: club.php' );

}

 

 

}

}

?>

 

 

I have know idea whats wrong with the loop.

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.