This topic is locked

Show PHP-Value in ....edit.htm

10/4/2006 5:13:29 AM
PHPRunner General questions
Pfeiffer author

In my function EditOnLoad() I define a Session-Variable
$_SESSION["FrageText"] = DBLookup ("FrageText","katalog_fragen_zwischenpruefung",$Bedingung);
I now want to display this value in edit.html -Page using the following syntax :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Fragen</TITLE>

<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK

...... href="include/style.css" type=text/css rel=stylesheet>{$includes}
<FORM name=editform action=schueler_zp_fragen_edit.php method=post

encType=multipart/form-data {$onsubmit}>{include_if_exists file="include/header.php"}

<H1>Fragen, Datensatz ändern [ ID: {$show_key1}] </H1>{doevent name="EditOnLoad"} {$message}

<DIV align=left>

<HR width=300 noShade SIZE=1>

</DIV>

<P>   <A href="schueler_zp_fragen_list.php?a=return">Zurück zur

Liste</A><BR></P>

<P>

<TABLE cellSpacing=1 cellPadding=1 width="75%" border=1>

<TBODY>

<TR>

<TD>Â Frage</TD>

<TD style="WIDTH: 20px">Â </TD>
?></TD></TR>
but I get no result.
Any idea what is wrong ? Can I use smarty to display this value on html ?
Best regards

Uwe Pfeiffer

Alexey admin 10/5/2006

Uwe,
the PHP code won't work in HTML file.

You need to follow Smarty guideline to output anything.

Here is what you can do.
Put this code into your Edit.htm page using HTML mode in Visual Editor:

{$fragetext}



Then add these two lines to Edit OnLoad event:

global $smarty;

$smarty->assign("fragetext",$_SESSION["FrageText"]);