0

I had this error: Parse error: syntax error, unexpected T_STRING in C:\Program Files\WampServer\www\atestat\admin_add.php on line 14 I can't figure out what's the mistake, so I posted here. I use PHP version 5.3.5.
Here is admin_add.php file:

<?php
include('config.php');
$categorie = $_REQUEST['categorie'];
$titlu = $_REQUEST['titlu'];
$autor = $_REQUEST['autor'];
$descriere = $_REQUEST['descriere'];
$context = $_REQUEST['context'];

if(empty($categorie) || empty($titlu) || empty($autor) || empty($descriere) || empty($context))
{
	die("Completati toate casutele !<br><a href='/atestat/admin/index.html'>Inapoi</a>");
}

$inserare = mysql_query("INSERT INTO '".$categorie."' (id, titlu, data, descriere, context, autor) VALUES ('"NULL"', '".$titlu."' ,  CURDATE( ) , '".$descriere."' , '".$context."', '".$autor."')");
?>

Edited by pnKK: n/a

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by diafol
0
$inserare = mysql_query("INSERT INTO '".$categorie."' (id, titlu, data, descriere, context, autor) VALUES ('\"NULL\"', '".$titlu."' ,  CURDATE( ) , '".$descriere."' , '".$context."', '".$autor."')");

Try that. Do you need to place NULL in quotes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.