[php] confusion
bazzouz
Messages postés
363
Date d'inscription
Statut
Membre
Dernière intervention
-
bazzouz Messages postés 363 Date d'inscription Statut Membre Dernière intervention -
bazzouz Messages postés 363 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
dans mon script php j'ai fai ce code :
<?php
ligne1;
?>
<?php
ligne2;
?>
et ça marche, mais, lorsque je met :
<?php
ligne1;
ligne2;
?>
ça marche pas
Pourquoi?????
dans mon script php j'ai fai ce code :
<?php
ligne1;
?>
<?php
ligne2;
?>
et ça marche, mais, lorsque je met :
<?php
ligne1;
ligne2;
?>
ça marche pas
Pourquoi?????
A voir également:
- [php] confusion
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP
10 réponses
voila le code complet, c'est avec xajax :
window.onload=function(){
<?php
if (isset($_SESSION['id'])){
echo "xajax_afficherInfomembre( ".$_SESSION['id'].")";
}
?>
<?php
if (isset($_SESSION['id']) AND ((!empty($_GET)) AND($_GET['page']=="entourage"))){
echo "xajax_afficherFriendv(0,11,".$_SESSION['id'].")";
}
?>
}
window.onload=function(){
<?php
if (isset($_SESSION['id'])){
echo "xajax_afficherInfomembre( ".$_SESSION['id'].")";
}
?>
<?php
if (isset($_SESSION['id']) AND ((!empty($_GET)) AND($_GET['page']=="entourage"))){
echo "xajax_afficherFriendv(0,11,".$_SESSION['id'].")";
}
?>
}
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Essaye ça :
window.onload=function(){
<?php
if ( isset($_SESSION['id']) ) {
echo "xajax_afficherInfomembre( ".$_SESSION['id'].")";
}
if ( ( isset($_SESSION['id']) ) && ( !empty($_GET) ) && ( $_GET['page'] == "entourage" ) ) {
echo "xajax_afficherFriendv(0,11,".$_SESSION['id'].")";
}
?>
}
window.onload=function(){
<?php
if ( isset($_SESSION['id']) ) {
echo "xajax_afficherInfomembre( ".$_SESSION['id'].")";
}
if ( ( isset($_SESSION['id']) ) && ( !empty($_GET) ) && ( $_GET['page'] == "entourage" ) ) {
echo "xajax_afficherFriendv(0,11,".$_SESSION['id'].")";
}
?>
}
if ( ( isset($_SESSION['id']) ) && ( !empty($_GET) ) && ( $_GET['page'] == "entourage" ) )
$_GET est une variable globale assimilable à un tableau un array
donc tu ne peux pas tester un array par !empty
ou alors il lui faut un index: $_GET[''page'] par exemple
ou alors en testant sa taille:
$_GET est une variable globale assimilable à un tableau un array
donc tu ne peux pas tester un array par !empty
ou alors il lui faut un index: $_GET[''page'] par exemple
ou alors en testant sa taille:
if(sizeof($_GET)>0)
OUI, ça marche comme ça, même avec ce que j'ai mis au début ça marche, il se peu qu'après une modification du code que ça a marché.
Merci
Merci