What is wrong with this code?
Posted: Sat Mar 14, 2009 5:23 pm
what is wrong with this code, it tells me:
Line 38 is the line with red color
Code: Select all
Parse error: parse error in C:\xampp\htdocs\elektro\lajm.php on line 38Code: Select all
<html>
<body>
<?php
include ("menu/menu.php");
?>
</br>
<strong><center><form action="<?=$_SERVER['PHP_SELF']?>" method="post">
Emri: <input type="text" name="emri" /></br>
Lajmi: <textarea name="lajmi" rows="5" cols="26"></textarea></br>
Data: <input type="date" name="data" /></br>
<input type="submit" name="dergo" value="Dërgo" />
</form></center></strong>
<?php
if (isset($_POST['dergo'])) {
include ("konfig.php");
$con = mysql_connect("$serveri","$username","$fjalekalimi");
if (!$con)
{
die('Nuk Mund Të Konektohet: ' . mysql_error());
}
mysql_select_db("$databaza", $con);
$sql="INSERT INTO lajmet (emri, lajmi, data)
VALUES
('$_POST[emri]','$_POST[lajmi]','$_POST[data]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "U Shtua Një Lajm";
mysql_close($con)
[color=#FF0000]}[/color]
?>
<?php
include ("posht.php");
?>
</body>
</html>