You get an array as a result. An array is a list of values, denoted by keys. For example:
<?php
$myArray = Array(
'name' => 'Ginger',
'profession' => 'pentester',
'age' => 20
);
?>
You can now access each value through these keys:
<?php
echo $myArray['name']; // Results in Ginger
echo $myArray['age']; // Results in 20
?>
So in your example, you can first print it using print_r or var_dump. Then, when you know the structure of your array, you can access it as shown (and as done by d3nn at the end of his post)
<div>
<marquee>
<?php
$connection = mysql_connect("*********", "*********", "******");
if ( !$connection ) {
throw new Exception( 'Failed to make a connection: '.mysql_error() );
}
$success = mysql_select_db("cydiapdt")
if ( !$success ) {
throw new Exception( 'Failed to select the database: '.mysql_error() );
}
$result = mysql_query("SELECT * FROM marquee LIMIT 1");
if ( !result ) {
throw new Exception( 'Failed to query the database: '.mysql_error() );
}
$row = mysql_fetch_assoc( $query );
echo htmlspecialchars($row['columnname']);
?>
</marquee>
</div>
Use htmlspecialchars() to prevent XSS!