Jump to content

[SOLVED] please help with unexpected T_String Error


ElectricShaka

Recommended Posts

This is my code:

 

<?php
/* Function addNewType
* Desc Adds a new pet type and description to the
* ThemeType table. Checks for the new theme type
* first and does not add it to the table if
* it is already there.
*/
function addNewType($themeType,$typeDescription,$conn)
{
$query = "SELECT themeType FROM theme WHERE themeType= '$themeType'";
$result = mysql_query($query) or die(“Couldn’t execute select query”);
$ntype = mysql_num_rows($result);
if ($ntype < 1) // if new type is not in table
{
$themeType = ucfirst(strip_tags(trim($themeType)));
$typeDescription = ucfirst(strip_tags(trim($typeDescription)));
$themeType = mysqli_real_escape_string($conn,$themeType);
$typeDescription = mysqli_real_escape_string($conn,$typeDescription);
$query=”INSERT INTO themeType (themeType,typeDescription)
VALUES ('$themeType','$typeDescription')”;
$result = mysqli_query($conn,$query) or die(“Couldn’t execute insert query”);
}
return;
}
?>

The error I get is:

Parse error: parse error, unexpected T_STRING in /homepages/9/d209608306/htdocs/epiklayouts/functions.inc on line 11

 

Any help is greatly appreciated. The above code is actually a file named functions.inc which I include in other php files when it is needed. I can post the other coded files if necessary.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.