Forum Moderators: coopster

Message Too Old, No Replies

unexpected T_STRING

         

UnikRasu

8:56 am on Dec 7, 2002 (gmt 0)

10+ Year Member



hello

why am i getting this error message

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in c:\inetpub\wwwroot\php\martin\telebok_skicka.php on line 19

in this file

<html>
<head>
<title>Martins telefonbok</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<?php
$db = "telebok";
$table = "telebok_table";

// connecting to database

$conn = mysql_connect("localhost") or
die("kan inte ansluta till databasen");
echo "ansluten till databasen"

// selecting database
mysql_select_db($db) or
die ("Could not select database");
echo "selcted database $db.<br>";

// inserting info into database

if($submit == sign) {
$query = "insert into $table
(namn, telenr, mobilnr, address, postnr, postort) values ('$namn', '$telenr', '$mobilnr', '$address', '$postnr', '$postort')";
mysql_guary($quary) or
die(mysql_error())
?>
din address har blivit inlaggd
<a href = "telebok_visa">visa din Telefonbok</a>

<?php
}
else
{
?>
det blev något fel så
du har inte skrivit något i din telefonbok ännu.
Om du vill skriva i den igen så klicka <a href = "telebok.htm">här</a>
om du istället vill gå och kolla i din telefon bok så kan du klicka <a href = "telebok_visa.php">här</a>
<?php
}
?>
</body>
</html>

if you see any other wrong you can writ them to me spo i can easler built this program

Lisa

9:40 am on Dec 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The unexpected T_STRING usually means missing semicolon.

echo "ansluten till databasen" ;