troubleshooting Question

PHP Code Not Working HELP.

Avatar of narmi2
narmi2 asked on
1 Comment1 Solution171 ViewsLast Modified:
I am getting an error when I run this code

      if($_GET['id'] == "")
            echo = "<div class="floatleft"><h1><strong>Some Text Here</strong></h1></div>";
            echo = "<div class="floatleft"><h1><strong>".gettitle($_GET['id'])." Some Text Here</strong></h1></div>";
      function gettitle($querystring)
            $connection = mysql_connect('servername', 'password', '') or die (mysql_error());
            $db = mysql_select_db('databasename', $connection) or die (mysql_error());
            $query = "select the_description from the_table where the_code = '".$querystring."'";
            $result = mysql_query($query) or die (mysql_error());
            $row = mysql_fetch_array($result);
            return $the_description;

the error i get is:

Parse error: parse error, expecting `','' or `';'' in /var/www/html/ on line 40

Any ideas?

Hopefully a silly mistake on my part.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros