Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.