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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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');
?>

Link to comment
Share on other sites

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.