variable value is not being pushed to the next page
Posted: Thu Nov 07, 2002 7:39 am
I have a value which has been set in the previous page but it is not going through:
for example I set a variable to a dynamic number which it pulls from the database but when it is supposed to be used on the next page it gets lost !
this is what it looks like:
And then on the next page it should put the number into the id variable:
but when i run it it gives me the following error:
Error in query: SELECT *,contentid FROM mecercontent WHERE contentid = . You have an error in your SQL syntax near '' at line 1
thanks
?>
for example I set a variable to a dynamic number which it pulls from the database but when it is supposed to be used on the next page it gets lost !
this is what it looks like:
Code: Select all
<?php
<a href="main_intro.php?id=
<? echo $row->contentid . "&pagetype=news" ?>
">
<font color="#69B92E"><? echo nl2br(substr($row->information,0 ,70)); ?>
?>Code: Select all
<?php
If ($id = '')
$query = "SELECT * FROM mecercontent ORDER BY date DESC";
Else
$query = "SELECT *,contentid FROM mecercontent WHERE contentid = $id ";
?>Error in query: SELECT *,contentid FROM mecercontent WHERE contentid = . You have an error in your SQL syntax near '' at line 1
thanks
?>