alexarpad2003 Posted December 10, 2010 Report Posted December 10, 2010 Am asa :<?php include('xxx.php'); $get_user = mysql_query("SELECT * FROM users WHERE username='".$_SESSION['s_username']."' AND password='".$_SESSION['s_password']."' "); if(mysql_num_rows($get_user) > 0)// Means it's got result. { $row_user = mysql_fetch_array($get_user); echo "blablabalbabla<br><?php include('header.php'); ?> blablablablaba"; } else { echo"dispari"; } ?>De ce nu imi ia comanda include ? Am incercat si cu require dar nu merge. Nu-mi da nici o eroare in pagina, doar ca nu afiseaza ce ar trebui sa fie in header.php . header.php contine = blabla123blalbaAm dat doar un exemplu. Quote
Vlachs Posted December 10, 2010 Report Posted December 10, 2010 echo "blablabalbabla<br><?php include('header.php'); ?> blablablablaba"; nu se include, deci se afiseaza ca html Quote
alexarpad2003 Posted December 10, 2010 Author Report Posted December 10, 2010 Poi si ce solutie imi dai ? Am multe pagini si chiar am nevoie de functia include . Quote
Vlachs Posted December 10, 2010 Report Posted December 10, 2010 creezi o functie, o salvezi intr-un fisier.php, incluzi fisierul in care ai pus functia si o apelezi unde ai nevoie Quote