PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$index=$_GET['index'];
$sql = "SELECT * FROM `t_board` WHERE index='$index'"; <---- not working Any help will be appreciated
$result = mysql_query($sql);
<? while($rows = mysql_fetch_array($result)){
?>
echo $rows['writer'];
echo $rows['subject'];
echo $rows['message'];
echo $rows['filename'];
Last edited by Benjamin on Thu Oct 06, 2011 5:25 am, edited 1 time in total.
Reason:Added [syntax=php|sql|css|javascript] and/or [text] tags.
<?php
$result = mysql_query($sql) or die(mysql_error());
?>
The query itself won't report an error so you check for it when passing the query to mysql_query() by using the die() function. Add the example line into your script and paste the results back here
Tip: It helps to be thorough when asking for help, giving as much information about the error / problem usually results in a speedy solution to the problem or error.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering