Re: PHP not include my form
| From: | Hugh Danaher | Date: | Tue, 20 May 2003 20:03:06 +0000 |
| Subject: | Re: PHP not include my form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148318@lists.php.net to get a copy of this message | ||
All a bit too complex for easy reading but...
call_user_func('ECHAN_add_1',$dParam,$dConfig,$dSession);
should call the function to action.
Hugh
----- Original Message -----
From: "ermelir" <ermelir@ifrance.com>
To: <php-general@lists.php.net>
Sent: Tuesday, May 20, 2003 11:04 AM
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...
>
>
> _____________________________________________________________________
> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>