Ok, now further down my page
This:
<div class="right">
<h3>Latest Completed Projects:</h3>
<div class="right_articles">
<p><img class="image" title="Image" alt="Image" src="<?php completed_proj(4)?>"><b><?php completed_proj(1);?></b></p>
<p><?php completed_proj(2);?></p>
<p><a href="<?php completed_proj(3);?>">Visit Website</a></p>
<p>This was a <?php completed_proj(5);?> project</p>
</div>
Produces this:
Warning: mysql_result(): type not found in MySQL result index 12 in /home/trecollc/public_html/test/functions.php on line 25
Warning: mysql_result(): type not found in MySQL result index 13 in /home/trecollc/public_html/test/functions.php on line 25
An upcoming events calendar using MySQL. 1st beta version released
Visit Website
This was a
Warning: mysql_result(): type not found in MySQL result index 15 in /home/trecollc/public_html/test/functions.php on line 25
project
using this:
function completed_proj($w) {
$query = "SELECT * FROM projects";
$result = mysql_query($query);
$n = mysql_num_rows($result);
$i = ($n-1);
$t = mysql_result($result,$i,"title");
$d = mysql_result($result,$i,"description");
$u = mysql_result($result,$i,"url");
$i = mysql_result($result,$i,"img");
$t = mysql_result($result,$i,"type");
IF ($w == "1"){print "$t";}
IF ($w == "2"){print "$d";}
IF ($w == "3"){print "$u";}
IF ($w == "4"){print "$i";}
IF ($w == "5"){print "$t";}
}
TIA
RT