Hmm I've got to go back to the basics I just can't seem to figure out why this code doesn't work???????
<?php
session_start();
// Start an if block that checks the value of $valid
if ($_SESSION[valid] != "yes") {
session_register('valid'); }
$db_name = "database";
$table_name = "Articles";
$connection = @mysql_connect("localhost", "database", "password") or die (mysql_error());
$query = "SELECT image FROM Articles WHERE a_id = 1 ";
$result = mysql_query($query) or die('Error, sonOfaB');
echo "$result";
?>
Nothing major and the error I get is Error, sonOfaB I don't know what I"m doing wrong but this has to be a stupid mistake because this code is so simple in the image field I have a line of code to an image stored on the server like <img source="picture.jpg">
<?php
session_start();
// Start an if block that checks the value of $valid
if ($_SESSION[valid] != "yes") {
session_register('valid'); }
$db_name = "database";
$table_name = "Articles";
$connection = @mysql_connect("localhost", "database", "password") or die (mysql_error());
$query = "SELECT image FROM Articles WHERE a_id = 1 ";
$result = mysql_query($query) or die('Error, sonOfaB');
echo "$result";
?>
Nothing major and the error I get is Error, sonOfaB I don't know what I"m doing wrong but this has to be a stupid mistake because this code is so simple in the image field I have a line of code to an image stored on the server like <img source="picture.jpg">