messer Posted June 19, 2009 Share Posted June 19, 2009 function select() { include('dbinfo.php'); $Link = mysql_connect ("localhost", $username, $password) or die ('Unlucky'); mysql_select_db($database) or die( "Unable to select database"); $query = mysql_query("SELECT bon.ID,bon.ArtID as Article,bon.total,bon.bonID,bon.klientID,article.ArtID, article.Artdescription, article.ArtNumer FROM bestelboninf, article WHERE ( bon.bonID='".$bonid."' AND bon.klientID='".$klient."' AND bon.ArtID= article.ArtID ) "); $select = '<select name="article[]">'; while ($row = mysql_fetch_array($query)) { $select.= '<option value="'.addentities($row['ArtID']).'">'; $select.= ''.addentities($row['ArtNumer']).' -:- '.addentities($row['Artdescription']).''; $select.= '</option>'; } $select.= '</select>'; return $select; mysql_close (); } Kan somebody help me???? Whats wrong in my code???? it doesn't work when i want to execute <? function bon(); ?> Link to comment https://forums.phpfreaks.com/topic/162885-function-select/ Share on other sites More sharing options...
Jibberish Posted June 19, 2009 Share Posted June 19, 2009 And function bon() would be? We would probably need to see that as well. Also I think you need to called mysql_close (); before you return the result else it will never get to that statement. Link to comment https://forums.phpfreaks.com/topic/162885-function-select/#findComment-859468 Share on other sites More sharing options...
messer Posted June 19, 2009 Author Share Posted June 19, 2009 oh.... sh...t sorry people... i've done a mistake.... function select(); Link to comment https://forums.phpfreaks.com/topic/162885-function-select/#findComment-859501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.