narmi2
asked on
PHP Code Not Working HELP.
I am getting an error when I run this code
<?php
if($_GET['id'] == "")
{
echo = "<div class="floatleft"><h1><str ong>Some Text Here</strong></h1></div>";
}
else
{
echo = "<div class="floatleft"><h1><str ong>".gett itle($_GET ['id'])." Some Text Here</strong></h1></div>";
}
function gettitle($querystring)
{
$connection = mysql_connect('servername' , 'password', '') or die (mysql_error());
$db = mysql_select_db('databasen ame', $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) ;
extract($row);
return $the_description;
}
?>
the error i get is:
Parse error: parse error, expecting `','' or `';'' in /var/www/html/www.mysite.co.uk/site/mypage.php on line 40
Any ideas?
Hopefully a silly mistake on my part.
<?php
if($_GET['id'] == "")
{
echo = "<div class="floatleft"><h1><str
}
else
{
echo = "<div class="floatleft"><h1><str
}
function gettitle($querystring)
{
$connection = mysql_connect('servername'
$db = mysql_select_db('databasen
$query = "select the_description from the_table where the_code = '".$querystring."'";
$result = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($result)
extract($row);
return $the_description;
}
?>
the error i get is:
Parse error: parse error, expecting `','' or `';'' in /var/www/html/www.mysite.co.uk/site/mypage.php on line 40
Any ideas?
Hopefully a silly mistake on my part.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.