Jump to content

function select();


messer

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.