...

View Full Version : Need help with a simple function



OhHai
11-06-2012, 10:59 PM
Hey all, new here; no idea where to post. Heh, so I am a failure at writing functions; as I have not studied much on them.. Basically I am trying to make New = 1 and Used = 0 so it will post in place with a simple $coach_meta.. I know it is easy, but hey, I suck.


function coach_meta2 ($nu = '') {

global $dbh;

$output = '';
$coach_meta = coach_meta($data['ID']);
$nu = ($coach_meta['ecpt_newused']);

if ($nu = "New") {

$nu = "1";

}
else
{
if ($nu = "Used") {

$nu = "0";

}

$nu = mysql_query($query);

while($data2 = mysql_fetch_assoc($nu)) {
$output = $data2;
}


}

return $output;

}

Anyone care to help an noob? haha

Fou-Lu
11-06-2012, 11:16 PM
Umm, why did you create a new account just to post this?
I replied to your other thread which I restored and moved into the proper forum here: http://www.codingforums.com/showthread.php?t=281290



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum