I can't upload anything on increasing the number of words


//This is code in which we can choose the type and size file uploaded or upload anything. We can declare the path of folder or can do without it.
if($_FILES['uploaded_file']['size']< 200000)
echo "Error occurs".$_FILES['up_test']['error']."<br/>";
echo "Uploaded Title--$Title<br/>";
echo "Uploaded City--$City<br/>";
echo "Uploaded Content--$Content<br/>";
echo "Uploaded Date of Event--$Date<br/>";

/*if(file_exists("upload/". $_FILES['uploaded_file']['name']))
echo "File".$_FILES['uploaded_file']['name']." already exists";
echo "File uploaded-- ".$_FILES['uploaded_file']['name']."<br><br><br>";
echo "File size is too large or Not Uploaded ";
$result=mysqli_query($dbc,"insert into events (Title,City,Content,Photo,Date) values ('$Title','$City','$Content','$path','$Date')") or die ('Not Connected Events');
//echo "PAth";
<link rel="stylesheet" type="text/css" href="css/style.css" />
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"
<h4>Enter Events</h4><br>
Enter Title <br><textarea rows="10" cols="10" name="Title"></textarea><br>
Enter City <br><input type="text" name="City"><br>
Enter Content <br><textarea rows="10" cols="10" name="Content"></textarea><br>
<label for="file">Upload Photo<br></label>
<input type="file" name="uploaded_file"  /> 
<br />
Enter Date of Event<br> <input type="text" name="Date" value="yyyy-mm-dd"><br>
<input type="submit" name="submit" value="Upload" />
<?php require_once('lower.php');?>


Hi friends…
In above code when i upload title or content within range of 20 words it works properly but when I increase numbers of words till approx. 100 words. It gives an error “Not Connected Events”. Not any file is uploaded in database.
I set the length of title and content in phpmyadmin is 500 and 1000 and type is varchar respectively.
I can’t understand where is problem???
I think it’s about something size???
Help me Anyone???

Instead of using a general error message like ‘Not Connected Events’, why not display the actual error mysql is throwing, and display the query as well?

$query = "insert into events (Title,City,Content,Photo,Date) values ('$Title','$City','$Content','$path','$Date')";
$result=mysqli_query($dbc, $query) or die ('Not Connected Events. Mysql error : ' . mysqli_error($dbc) . ' in query $query');

On calling die(mysli_error()) in place of “Not Connected”. I got this error “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near _______”
Now I don’t know what I should do???
Help plz…

You could start by doing what I asked. I didn’t say to use die(mysli_error()), but to use die(‘Not Connected Events. Mysql error : ’ . mysqli_error($dbc) . ’ in query $query’)

And anyway, I’m sure it didn’t say

to use near _______"

I’m sure there was some other text instead of ______ , wasn’t there?

Limit of a varchar is 255 chars, could that be causing the problem?

Thxxxxxxxxxx boss …
u r right???
It works…