Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 php access to object variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vogo
Novice

Switzerland
12 Posts

Posted - 22 Nov 2010 :  08:09:02  Show Profile  Visit vogo's Homepage  Reply with Quote
How can I access a DHE object variable by PHP?
Is there an example to get and set DHE Object variables like Labels?

s.dav
Site Admin

Italy
3364 Posts

Posted - 22 Nov 2010 :  09:28:47  Show Profile  Visit s.dav's Homepage  Reply with Quote
Can you explain your problem in a better way? I didn't undestand the question...

Regards, Davide
Go to Top of Page

vogo
Novice

Switzerland
12 Posts

Posted - 22 Nov 2010 :  20:23:14  Show Profile  Visit vogo's Homepage  Reply with Quote
As wrote a few weeks ago, I tried to create the sendmail example using PHP instead of ASP. In the example I couldn't fill-in the action "sendmail.php" in Form1. I recognized that that file must exists in project. But I wasn't able to overtake the content of the edit boxes to PHP mail call parameter. But finally, I would like to create an user interface with DHE using MySQL and PHP. For that purpose I search a documentation that describes the interface methods between DHE and PHP.
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 23 Nov 2010 :  08:47:31  Show Profile  Visit s.dav's Homepage  Reply with Quote
Maybe I'm missing something but I think you are forgotting the base of the HTML;

you need only to set the "action" property of the form, name fields into the form and from PHP you'll receive parameters with the same name.

Dynamic HTML Editor 5.x already has a PHP email processor; simply check the generated code and you're done.

Regards, Davide
Go to Top of Page

vogo
Novice

Switzerland
12 Posts

Posted - 24 Nov 2010 :  17:43:27  Show Profile  Visit vogo's Homepage  Reply with Quote
I am missing a real example that uses PHP by DHE. Now I tried once more the lesson1. I did the instruction step by step. But it doesn't accept the filename "sendform.php" at "002 Contactform" on property "Action" (I made a print screen from that step and sent it to @@@@). At that property I can only insert the name or select of an existing file. Now, I Have always the problem that I couldn't find-out what I must do to activate the PHP processor of DHE!
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 25 Nov 2010 :  11:35:55  Show Profile  Visit s.dav's Homepage  Reply with Quote
Please check this:

http://www.hexagora.com/download/dhe/tut-unimail/

and this:

http://www.hexagora.com/download/dhe/tut-formvalidation/

Regards, Davide
Go to Top of Page

Scandy
Novice

Italy
4 Posts

Posted - 03 Mar 2011 :  12:51:20  Show Profile  Visit Scandy's Homepage  Reply with Quote
Forse ho un "problema" simile. Vorrei creare con DHTML le mie pagine con "form" e "oggetti" vari per gestire una scheda anagrafica. I dati li recupero con php da un mysql. Posso assegnare i dati recuperati agli oggetti presenti nel form creato con l'editor? Oppure devo per forza creare gli oggetti via php? (in pratica come farei in un software non web; creo il form, i controlli e poi assegno i valori).

Grazie per qualsiasi info.

Saluti,
Marco
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 03 Mar 2011 :  13:40:26  Show Profile  Visit s.dav's Homepage  Reply with Quote
Scandy, puoi fare quello che vuoi; o crei i tuoi oggetti nel form con php oppure tramite javascript/php puoi accedere agli oggetti del form ed assegnarli il valore che hai letto dal db.

Regards, Davide
Go to Top of Page

Scandy
Novice

Italy
4 Posts

Posted - 04 Mar 2011 :  12:49:45  Show Profile  Visit Scandy's Homepage  Reply with Quote
Ok, ma come?
Con l'interfaccia DHTML ho due TextBox (Text1 e Text2). All'apertura della pagina il codice php che estrae i valori da mysql e li assegna alle caselle, ma non so come; solo con php posso farlo? le caselle hanno l'attributo "name" = a Text1 e Text2, come le identifico in php per assegnarli il valore iniziale da visualizzare all'apertura della pagina? Forse il problema ? talmente banale ... che mi sfugge.

C'? qualche esempio nell'help di DHTML per l'interazione tra codice php e oggetti?

Grazie

Edited by - Scandy on 04 Mar 2011 12:58:34
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 06 Mar 2011 :  19:38:48  Show Profile  Visit s.dav's Homepage  Reply with Quote
Non ho provato ma dovrebbe funzionare:

- seleziona in Dynamic HTML Editor il primo testo
- vai nel pannello delle propriet? di tale testo
- nella casella "Valore" inserisci del codice php del tipo "<?php echo $testo1 ?>

dove $testo1 contiene il valore che hai letto dal DB

Al contrario invece, cio? da pagina HTML a server leggerai con $_GET o $_POST i valori dei testi usando il nome che hai assegnato nel programma

cio? se nel programma il tuo testo si chiama Testo1 via PHP scriverai $_POST["Testo1"]


Regards, Davide
Go to Top of Page

Scandy
Novice

Italy
4 Posts

Posted - 08 Mar 2011 :  10:17:19  Show Profile  Visit Scandy's Homepage  Reply with Quote
Quasi perfetto. Intanto ho scoperto che la posizione dello script PHP nella pagina ? fondamentale, in questo caso posizionato prima della creazione del Form. Poi ho dovuto definire variabili di sessione, assegnarli i valori letti da mysql nello script php indicato sopra. A questo punto ho utilizzato il tuo suggerimento assegnando all'attributo 'value' il seguente: <?php echo $_SESSION['$txtOggetto'] ?> e pare che funzioni.
Altra domanda, anche se credo di sapere gi? la risposta: posso, ancora in php, cambiare gli attributi degli oggetti presenti nel Form? In pratica sto realizzando la classica pagina dove visualizzare i dati (caselle Input di sola lettura), poi cliccando su un pulsante (modifica), ricarico la pagina impostando un parametro GET su 'modifica' e quindi caricando la pagina in modo che le caselle di input non siano pi? di sola lettura. Non vorrei scomodare javascript per questa funzione, per? se non c'? altro modo... Oppure ? possibile come con l'attributo 'value' assegnare una variabile php che mi gestisco prima di visualizzare il form?
P.S.
per il momento grazie perch? ho risolto un "problema" che pensavo fosse banale ma invece mi ? risultato un po' ostico; in effetti il mio limite ? forse quello di cercare di applicare le stesse "regole" di programmazione che utilizzo in ambiente win anche sul web; ma l'idea di creare la mia pagina di interazione in progettazione e popolarla con i dati a runtime e gestirmeli mi sembrava "naturale", piuttosto di crearmi form, caselle e liste via html.
Credo che mi sentirai ancora.
Ciao

Saluti,
Marco
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 08 Mar 2011 :  12:21:16  Show Profile  Visit s.dav's Homepage  Reply with Quote
> he le caselle di input non siano pi? di sola lettura

puoi sempre via PHP se crei i campi di input in modo manuale (via PHP, scrivendo il tag html) ma dato che Dynamic HTML Editor ti crea gi? l'attributo "readonly" puoi solamente assegnare tale valore ad un campo o variabile javascript e modificare il campo tramite javascript.
Ti suggerisco ti guardarti "JQuery" se non la conosci.

Regards, Davide
Go to Top of Page

vogo
Novice

Switzerland
12 Posts

Posted - 10 Jan 2012 :  10:02:10  Show Profile  Visit vogo's Homepage  Reply with Quote
The correct solution for inserting mailers address put following source code (php) into editbox 'From address (optional)':
"' . $_POST["txtEmail"]. ';"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000