still not working I've tried the switch and without else but still nothing. I would paste the whole code but there's really no need.
switch(isset($ing1)){
fwrite($file,'<a class="menu" href="http://www.websitte.eu/alkohole/');
fwrite($file,$ing1);
fwrite($file,'.php">');
fwrite($file,$ing1);
fwrite($file,'</a>');
fwrite($file,' ');
fwrite($file,$ml1);
fwrite($file,'<br/>');
}else
{break;}
switch(isset($ing2)){
fwrite($file,'<a class="menu" href="http://www.websitte.eu/alkohole/');fwrite($file,$ing2);fwrite($file,'.php">');
fwrite($file,$ing2);fwrite($file,'</a>');fwrite($file,' ');fwrite($file,$ml2);
c}else
{break;}
(...)
as you can see it's just a "writing script". The only wrong thing is fwrite($file,'<br/>');. This script writes ingidients and after every ingridient there is a <br/>.The problem is that sometimes the number of ing. varies and it looks awful when the script leaves blanks spaces when nothing is entered(from form).So i wanted it to check if something is writen and write or just dont write anything...but I'm still no where near.    
|