Jump to content

[SOLVED] mysql_query error i can't seem to find


quickstopman

Recommended Posts

here is the code for one of my pages

<?
ob_start();
session_start();
include('config.php');
include('header.php');
?>
<h1>FlameAble Design</h1>
<?php
$sql = mysql_query("SELECT * FROM `news` WHERE `title` = '$_GET['title']' ") OR die(mysql_error());
while ($news_info1 = mysql_fetch_array($sql)) {
?>
?>
<p>
<table width="670px" height="104" class="table">
<tr>
<td width="365" align="right" valign="top" style="padding:10px;">
<h1><? echo $news_info1['title']; ?></h1>
<? echo $news_info1['content']; ?> 
</td>
<td width="71" align="center" valign="top" style="padding:10px;">
<script type="text/javascript">
digg_url = 'http://www.flameable.getmetola.com/news/<? echo $news_info1['title']; ?>';
digg_title = '<? echo $news_info1['title']; ?>';
digg_bodytext = '<? echo $news_info1['content']; ?>';
digg_topic = 'Design';
digg_bgcolor = '';
</script>
<div style="background-color:#FFFFFF; border: 2px solid #666633">
<script src="diggthis.js">
</script>
</div>
</td>
</tr>
</table>
</p>
<?
}
include('footer.php');
?>

i keep getting this error

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/pokebash/public_html/getmetola/flameable/news.php on line 9

 

can somebody help me stop the error??

thanks guys

im still getting the same error ???

im really confused

 

here is the updated code

<?php
ob_start();
session_start();
include('config.php');
include('header.php');
?>
<h1>FlameAble Design</h1>
<?php
$title = $_GET['title'];
$sql = mysql_query("SELECT * FROM `news` WHERE title = '{$title}'");
while ($news_info1 = mysql_fetch_array($sql)) {
?>
<p>
<table width="670px" height="104" class="table">
<tr>
<td width="365" align="right" valign="top" style="padding:10px;">
<h1><? echo $news_info1['title']; ?></h1>
<? echo $news_info1['content']; ?> 
</td>
<td width="71" align="center" valign="top" style="padding:10px;">
<script type="text/javascript">
digg_url = 'http://www.flameable.getmetola.com/news/<? echo $news_info1['title']; ?>';
digg_title = '<? echo $news_info1['title']; ?>';
digg_bodytext = '<? echo $news_info1['content']; ?>';
digg_topic = 'Design';
digg_bgcolor = '';
</script>
<div style="background-color:#FFFFFF; border: 2px solid #666633">
<script src="diggthis.js">
</script>
</div>
</td>
</tr>
</table>
</p>
<?
}
include('footer.php');
?>

i have no idea what im doing wrong

i updated the code again

still the error :(

 

<?
ob_start();
session_start();
include('config.php');
include('header.php');
?>
<h1>FlameAble Design</h1>
<?php
$title = $_GET['title'];
$sql1 = mysql_query("SELECT * FROM `news` WHERE `title` = '{$title}'");
$news_info1 = mysql_fetch_array($sql1);
?>
<p>
<table width="670px" height="104" class="table">
<tr>
<td width="365" align="right" valign="top" style="padding:10px;">
<h1><? echo $news_info1['title']; ?></h1>
<? echo $news_info1['content']; ?> 
</td>
<td width="71" align="center" valign="top" style="padding:10px;">
<script type="text/javascript">
digg_url = 'http://www.flameable.getmetola.com/news/<? echo $news_info1['title']; ?>';
digg_title = '<? echo $news_info1['title']; ?>';
digg_bodytext = '<? echo $news_info1['content']; ?>';
digg_topic = 'Design';
digg_bgcolor = '';
</script>
<div style="background-color:#FFFFFF; border: 2px solid #666633">
<script src="diggthis.js">
</script>
</div>
</td>
</tr>
</table>
</p>
<?
include('footer.php');
?>

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.