just wondering is there any way that I can return one value from my SQL database? Basically I am writining a website for my A level ICT coursework. The website must allow posts to be made users and these posts must be stored in a table and then can be viewed by clicking on them So far I have created a registration form and log in script to authenticate the session and delegate permission levels to users, I have created scripts which post threads to my database and have another script in place to store the data in the table Now I wish to be able to view my posts when I click on them So far my script is as follows
<?php include_once('scripts/session_a.php') ; ?>
<?php include_once('scripts/connection.php') ; ?>
<?php
$strSQL = "SELECT description FROM posts WHERE description=description";
$result = mysql_query($strSQL) or die('SQL Error :: '.mysql_error());
$row = mysql_fetch_assoc($result);
echo $row['description'];
?>
and this script is called from
<!--////////////////////////////////////////////////////////
// Project : Absolute Beginners log in system ///////////
// Purpose : A2 Level Coursework for ICT ////////////////
// Teacher : Mr L Hawkins ///////////////////////////////
// Student : Alex Sims //////////////////////////////////
// Candidate No. : 4173 /////////////////////////////////
// Centre No : 27168 ////////////////////////////////////
/////////////////////////////////////////////////////////-->
<?php include_once('includes/header.php') ; ?>
<?php include_once('includes/posts-header.php') ;?>
<div> <!-- Main Wrapper -->
<div class="Post Head"/><!-- Start Page -->
<name="Post" id="Post"/>
<h2>Absolute Beginners Forum</h2>
<div name="postname" id="postname"/> <!--PHP SCRIPT FEEDS NAME DATE AND AUTHOR HERE -->
<label></label>
<?php include('scripts/echo_test.php');?>
</div>
<div name="content" id="content"/> <!-- PHP SCRIPT FEEDS CONTENT HERE -->
<?php include('scripts/get_post_content.php')?>
</div>
</div><!-- End board-->
</div><!--End of page-->
</div> <!-- Main Wrapper Ends -->
<?php
a screenshot can be seen here of what I was trying to describe
http://gyazo.com/a8cfda3735c8bf2fd26b3b1c70fab191
Hopefully this generates a better understanding of my problem.
Thanks
Alex.