Forum Moderators: coopster

Message Too Old, No Replies

parse error, unexpected T_VARIABLE

error on php variable...

         

Mr_Biz

11:11 am on Oct 15, 2005 (gmt 0)

10+ Year Member



Hi everybody...

I have 2 php files... the 1st is a form and here goes part of it

<form action="insert_cassete.php" method="post" name="inserir cassete">
<p>Master
<input type="checkbox" name="master">
</p>
<p>
Programa
<input type="text" name="programa">
</p>
<p>
Data
<input type="text" name="data_1">

and this is the file that is processing the data from this form:

<?php
include_once("bd_func.php");

//ligar a bd
db_connect()

// Insere um novo clip na BD

//cria a var para o nome
$master=$_POST['master'];
$programa=$_POST['programa'];
$data=$_POST['data_1'];
$suporte=$_POST['suporte'];
$cliente=$_POST['cliente'];
$opcam=$_POST['opcam'];
$realizador=$_POST['realizador'];
$descricao=$_POST['descricao'];
$notas=$_POST['notas'];
?>

The problem is that I'm getting the following error:

Parse error: parse error, unexpected T_VARIABLE in c:\programas\easyphp1-8\www\arquivo\insert_cassete.php on line 18

Line 18 is $master=$_POST['master'];

Also, if i comment line 18, i get the same error but on line 19. and so on...

The code seems ok to be.. but apparently is not. What am I missing here?

Thanks all!

encyclo

11:18 am on Oct 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums Mr_Biz!

I'm not a PHP expert by any means, but isn't there supposed to be a semi-colon after the

db_connect()
line (just before your line 18)?

Mr_Biz

11:25 am on Oct 15, 2005 (gmt 0)

10+ Year Member



[quote ]
I'm not a PHP expert by any means, but isn't there supposed to be a semi-colon after the db_connect() line (just before your line 18)?
[/quote]

Hi encyclo.. yes it was! the dam semicolon... as usual, the small details make all the difference!

Thanks! :)