- Impact
- 20
PHP:
<?
include("config.php");
$select = "SELECT * FROM `news` WHERE id = '$id'";
$result= mysql_query($select);
while($data = mysql_fetch_array($result)){
$id= $data["id"];
$newstitle= $data["newstitle"];
if (@!$my_notes){
$my_notes = "No Notes Where entered";
}
}
?>
<html>
<head>
<title>arrghh</title>
</head>
<body>
<? echo $newstile; ?><br>
</body>
</html>
:cries:
anyone tell me whats wrong with this code?
if i go to news.php?id=1 nothing works but if its changed to this all to this
PHP:
<?
include("config.php");
$select = "SELECT * FROM `news`";
$result= mysql_query($select);
while($data = mysql_fetch_array($result)){
$id= $data["id"];
$newstitle= $data["newstitle"];
if (@!$my_notes){
$my_notes = "No Notes Where entered";
}
}
?>
<html>
<head>
<title>arrghh</title>
</head>
<body>
<? echo "$id <br> $newstitle" ?><br>dsfasdfasdfasdf
</body>
</html>
it selects the values but it doesnt work with the ?id=1
:cries: