Re: PHP not include my form
| From: | ermelir | Date: | Wed, 21 May 2003 06:01:13 +0000 |
| Subject: | Re: PHP not include my form | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148362@lists.php.net to get a copy of this message | ||
Hi,
thanks for you help; it was the parser error you show me.
Thanks
----- Original Message -----
From: "Kevin Stone" <kevin@helpelf.com>
To: "ermelir" <ermelir@ifrance.com>; <php-general@lists.php.net>
Sent: Tuesday, May 20, 2003 9:06 PM
Subject: Re: [PHP] PHP not include my form
>
> ----- Original Message -----
> From: "ermelir" <ermelir@ifrance.com>
> To: <php-general@lists.php.net>
> Sent: Tuesday, May 20, 2003 12:04 PM
> Subject: [PHP] PHP not include my form
>
>
> > Hello list,
> >
> > it's first time I post in this list, and I hope that someone will be
able
> > to solve my problems. First I would excuse myself for my poor english,
> > hopping that you will understand me... :)
> >
> > My problem is the following:
> > I have the following frontend call main.php
> > <HTML>
> > <HEAD>
> > <TITLE><?php echo $main['title']; ?></TITLE>
> > <LINK TYPE="text/css" href="style.css" rel=stylesheet>
> > </HEAD>
> > <BODY>
> > <DIV CLASS="principal">
> > <FIELDSET>
> > <LEGEND><?php echo $main['legend'];?></LEGEND>
> > <?php include $main['url']['principal'];?>
> > </FIELDSET>
> > </DIV>
> > </BODY>
> > </HTML>
> >
> >
> >
>
//--------------------------------------------------------------------------
> > ------------------
> > my index.php construct the variables for building the main.php
> > but in one of my fonction I have a problem:
> >
> >
> >
>
//--------------------------------------------------------------------------
> > ---------------------------
> > function ECHAN_add_1($dParam,$dConfig,$dSession)
> > {
> > ... $main = $dSession['main'];
> > // building the form_ECHAN_modif.php form
> > $main['form'] = array(
> > 'sMethod' => 'POST', // methode du formulaire
> > 'sAction' =>
> >
>
$dConfig['url']['frontend'].'?action='.$dParam['sAction'].'&cat='.$dParam['s
> > Cat'].'&phase=3'.$dSession['session_name'],
> > 'libelles' => $aLibelles,
> > 'sLabel_submit' => 'add');
> >
> > $main['url']['principal'] = "form_ECHAN_modif.php";
> > }
> > ...
> > . finSession($dConfig,$main,$dSession);
> > }// ECHAN add_1
> >
> > my form FORM_ECHAN_modif.php is not include! I don't understand why: I
> have
> > past the name from my PHP editor, I have replace the <?php include
> > $main['url']['principal'];?> by <?php include
> > "form_ECHAN_modif.php";?>
> but
> > It isn't include; And the problem that with other file, It is ok.
> >
> >
>
//--------------------------------------------------------------------------
> > ----------------------
> > here is the code of my function EndSession
> >
> > function finSession(&$dConfig,&$main,&$dSession)
> > {
> > //function that will free ressources
> > // save the session
> > if (isset($dSession) && (count($dSession)>0)){
> > $_SESSION['session'] = $dSession;
> > session_write_close();
> > }
> >
> > include $dConfig['url']['main']; // include the main.php form
> > exit(0);
> > }
> >
> >
> >
>
//--------------------------------------------------------------------------
> > ---------------------
> > here the code of my form_ECHAN_modif.php form
> >
> > <FORM METHOD="<?php echo
> > $main['form']['sMethod']?>" ACTION="<?php echo
> > $main['form']['sAction']?>" TARGET="_SELF">
> > <TABLE BORDER="0">
> > <TR><TD>
> > <TABLE BORDER="0" cellspacing="0"
> > cellpadding="1">
> > <?php
> > $aLibelles_keys =
> > array_keys($main['form']['libelles']);
> > for ($i = 0; $i < count($aLibelles_keys);$i++){
> > echo "<TR><TD CLASS=\"\"><INPUT
> > TYPE=\"TEXT\"
> >
> > NAME=\"".$main['form']['libelles'][$aLibelles_keys[$i]]['iNum']."\"
> >
> > VALUE=\"".$aLibelles_keys[$i]]['sValeur']."\"></TD></TR>\n";
> > }
> > ?>
> > </TABLE>
> > </TD></TR>
> > </TABLE>
> > <INPUT TYPE="submit" VALUE="<?php echo
$main['form']['sLabel_submit']?>"
> > CLASS="submit">
> > </FORM>
> >
> > thanks in advance for your help, hopping that you will see what's
> wrong...
>
>
> You have a parse error in form_ENCHAN_modif.php where..
> $aLibelles_keys[$i]][$'sValeur']. Other than that my guess is a variable
> scope issue but I'd need to see the entire ECHAN_add_1() function to be
> sure.
>
> - Kevin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> _____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie
> instantanée de France
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie
instantanée de France