Jeg holder på å mekke en script.
Er ikke proff med mysql og php, så jeg vet ikke hva jeg har gjort feil.
Jeg får ikke opp [COLOR=royalblue]<? $faisal= mysql_query("SELECT * FROM forumsvar WHERE topic='$topic' ");[/COLOR]
/index.php?side=innlegg&id=1&topic=Første innlegg
er det feil med dette.
Er ikke proff med mysql og php, så jeg vet ikke hva jeg har gjort feil.
Kode
$henta= mysql_query("SELECT * FROM post WHERE id='$id' "); while($get=mysql_fetch_array($henta)){ ?> <table cellSpacing="0" cellPadding="0" width="100%" id="table1"> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" bgColor="#d7e3ed" colSpan="3"> Emne<? echo " $get[topic]"; ?>:</td> <td> </td> </tr> <tr bgColor="#eeeeee"> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" width="20%" height="30"> Forfatter<? echo " $get[username]"; ?>:</td> <td style="BORDER-BOTTOM: #6699cc 1px solid" width="50%"> Dato<? echo " $get[date]"; ?>:</td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" align="right" width="30%"> </td> </tr> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="20%" height="100"> </td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> <? echo " $get[post2]"; ?></td> <tr> <? } ?> <? $faisal= mysql_query("SELECT * FROM forumsvar WHERE topic='$topic"); while($get=mysql_fetch_array($faisal)){ ?> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" bgColor="#d7e3ed" colSpan="3"> Emne<? echo " $get[topic]"; ?>:</td> <td> </td> </tr> <tr bgColor="#eeeeee"> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" width="20%" height="30"> Svar av:</td> <td style="BORDER-BOTTOM: #6699cc 1px solid" width="50%"> Dato<? echo " $get[date]"; ?>:</td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" align="right" width="30%"> </td> </tr> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="20%" height="100"> </td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> <? echo " $get[answer]"; ?></td> <tr><? } ?> <? $fal= mysql_query("SELECT * FROM post WHERE id='$id' "); while($get=mysql_fetch_array($fal)){ ?> <form method='post' action=index.php?side=forum5> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="19%" height="23"> Topic</td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> <input type="text" name="topic" size="20" value="<? echo " $get[topic]"; ?>"></td> </tr> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="19%" height="23">Username</td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> <input type="text" name="username" size="20" value="<? echo " $get[username]"; ?>"></td> </tr> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="19%" height="23">Skriv Innegget ditt:</td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> </td> </tr> <tr> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="19%" height="26"> </td> <td style="BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #6699cc 1px solid; BORDER-BOTTOM: #6699cc 1px solid" vAlign="top" width="80%" colSpan="2"> <textarea rows="12" name="answer" cols="64"></textarea></td> </tr> </table> <input type='submit' value='Submit' name='submit'> </form> </tr></table><? } ?>
Jeg får ikke opp [COLOR=royalblue]<? $faisal= mysql_query("SELECT * FROM forumsvar WHERE topic='$topic' ");[/COLOR]
/index.php?side=innlegg&id=1&topic=Første innlegg
er det feil med dette.