Toon posts:

[flash] beveilgde cgi mail form script

Pagina: 1
Acties:

Verwijderd

Topicstarter
Onder mijn verzend buttom (flash form) zit de volgende code:
code:
1
2
3
on (release) {
    getURL("http://www.xs4all.nl/cgi-bin/mail-a-form", "_blank", "POST");
}


In mijn Actions for Frame 5 of Layer Name form data staat de volgende:
code:
1
2
3
to = "paperfac@xs4all.nl";
subject = "contact";
referer = "http://www.thepaperfactory.nl/contact.htm";


MAAR wanneer ik op verzend druk krijg ik deze melding:

Fout tijdens mail versturen
Het versturen van mail is mislukt. Waarde van hidden subject veld niet correct

Wanneer ik de subject regel weg haal krijg ik deze ook?

Het script staat hier http://www.xs4all.nl/cgi-bin/mail-a-form en de bijbehorende docu is:

# Special variables -
# to - (required) sets the "To:" address. Multiple To: addresses allowed. # nextpage - URL what should be displayed after the mail has been sent
# (can be relative to current page). Only one nextpage
# allowed (others are ignored). If not present, a standard
# message is given.
# from - specifies the "From:" address. Only one address allowed. # subject - sets the "Subject:". Only one subject allowed. # body - Specify the body of the mail, perl-like backslash\ escapes work fine.
# You can use ${var} to interpolate the contents of var. If there
# are multiple instances of var, you can use ${var,"sep"} to insert
# all instances of var, separated by "sep" (without quotes).
# The default is to use comma-separation, so ${var} equals to
# ${var, ","}
# multiple "body" tags will appear separated by a newline.
# the special var ${query_string} equals the query string as
# passed to the script
# required - variables that should be non-zero, otherwise ${missing} is
# displayed. You can either add multiple "required" tags, or
# put the required fields comma-separated in one or more
# "required" tags.
# missing - URL that is displayed when some variable in ${required} isn't
# filled in. A % in this name is replaced with the name of the
# missing key (if missing is set, and there is no "to" field, then
# missing is used as well, and any "%" is replaced by "to");
# you can have only one missing tag.
# referer - "current" URL. The URL in which you call mail-a-form. Not all
# browsers send a referer, and the script definately needs one.
#
# any other variables are simply printed in the script, as "key = value" pairs. # html-isms like %HEX and + for space are removed.

Iemand een ideetje wat ik verkeerd doe?

  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 10:32

GrimaceODespair

eens een tettenman, altijd ...

Lukt je dit wel met HTML ?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
Ja,

Hier een stukje code die ik in een html file gebruik.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<form method="post" action="http://www.xs4all.nl/cgi-bin/mail-a-form"> 
 
  <INPUT TYPE="hidden" NAME="to" VALUE="paperfac@xs4all.nl">
  <input type="hidden" name="subject" value="Bestelling A4 Bedrukt">
  <INPUT TYPE="hidden" NAME="nextpage" VALUE="http://www.thepaperfactory.nl/bestelling/bedankt.html">
  <input type="hidden" name="required" value="firmanaam"> 
  <input type="hidden" name="required" value="contactpersoon"> 
  <input type="hidden" name="required" value="email"> 
  <input type="hidden" name="required" value="aantal"> 
    
 
 
  <table width="525" border="0" hspace="0" cellpadding="0" cellspacing="0" background="images/ag_form.gif"> 
    <tr> 
      <td >[img]"images/kop_a4bedrukt.gif"[/img]</td> 
    </tr> 
    <tr background="images/ag_form.gif">  
      <td >  
        <table width="100%" border="0" hspace="0" cellpadding="0" cellspacing="10" class="text"> 
          <tr valign="top">  
            <td colspan="2" > <b>Bestelgegevens A4 bedrukt</b></td> 
          </tr> 
          <tr valign="top">  
            <td width="125" >Aantal</td> 
            <td > <input type="text" name="aantal" size="36"> </td> 
          </tr> 
          <tr valign="top">  
            <td width="125" >Papier</td> 
            <td > <input type="radio" name="papier" value="wit"> 
              Wit  
              <input type="radio" name="papier" value="gekleurd"> 
              Gekleurd</td> 
          </tr> 
          <tr valign="top">  
            <td width="125" >Breedte x Lengte (mm)</td> 
            <td > <select name="formaat" size="1"> 
                <option value="A4 - 210 x 297" selected>A4 - 210 x 297</option> 
              </select> </td> 
          </tr> 
.............
</table> 
</form>


Ik snap niet wat ik in flash erbij moet zetten of veranderen?

  • CrashOne
  • Registratie: Juli 2000
  • Niet online

CrashOne

oOoOoOoOoOoOoOoOoOo

Je submit via flash toch ook helemaal geen formulier? Logisch dat het mis gaat, er worden een aantal velden verwacht die jij niet post.

Huur mij in als freelance SEO consultant!


  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 10:32

GrimaceODespair

eens een tettenman, altijd ...

CrashOne schreef op 22 mei 2003 @ 15:37:
Je submit via flash toch ook helemaal geen formulier?
Snap ik het nou niet of zo? Hij doet toch POST? Da's toch equivalent aan een formulier posten?

@TS: trace vóór je getURL eens voor de zekerheid alle variabelen die je meestuurt.

Wij onderbreken deze thread voor reclame:
http://kalders.be


  • CrashOne
  • Registratie: Juli 2000
  • Niet online

CrashOne

oOoOoOoOoOoOoOoOoOo

Sorry, zou moeten werken, mijn fout!

Zet je variabelen nog een keer in het frame waar je ze post. En trace ze even zoals hierboven ook al wordt gezegt.

Huur mij in als freelance SEO consultant!


Verwijderd

Topicstarter
on (release) {
to = "paperfac@xs4all.nl";
subject = "contact";
referer = "http://www.thepaperfactory.nl/contact.htm";
getURL("http://www.xs4all.nl/cgi-bin/mail-a-form", "_blank", "POST");
}

Variabelen heb ik er in gezet. Nog steeds dezelfde error.

Tevens heb ik test movie gedaan en dan list variables:

Level #0:
Variable _level0.$version = "WIN 6,0,21,0"
Variable _level0.e-mailadres = " a@a.a"
Variable _level0.faxnummer = " 0031"
Variable _level0.telefoonnummer = "0031"
Variable _level0.contactpersoon = "ik"
Variable _level0.bedrijfsnaam = " test"
Variable _level0.tijd = "tussen 8:00 en 9:00 uur"
Variable _level0.dag = "maandag"
Variable _level0.to = "paperfac@xs4all.nl"
Variable _level0.subject = "contact"
Variable _level0.referer = "http://www.thepaperfactory.nl/contact.htm"
Movie Clip: Target="_level0.instance18"
Movie Clip: Target="_level0.instance16"
Movie Clip: Target="_level0.instance14"
Movie Clip: Target="_level0.instance12"
Movie Clip: Target="_level0.instance6"
Movie Clip: Target="_level0.instance4"
Movie Clip: Target="_level0.instance2"

Maar nog steeds bij het kliken op zenden de zelfde error!

Die trace tip snap ik niet helemaal. Ik heb al gesearched in de flash help.
Kan ik dus daarmee een tijdelijke popup in bouwen met wat hij aan het doen is?

Verwijderd

Probeer het eens met loadVariablesNum ipv GetUrl. Op die manier stuur ik ook variabelen naar mijn ASP scripts.

  • oh,when?
  • Registratie: April 2000
  • Niet online

oh,when?

...

een POST in flash is geen POST maar een Hybride oplossing tussen een GET en een POST. ws verwacht het Perl script een echte POST. Vandaar

"You're only as good, as what you did last week."


  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 10:32

GrimaceODespair

eens een tettenman, altijd ...

Verwijderd schreef op 27 mei 2003 @ 15:01:
Die trace tip snap ik niet helemaal. Ik heb al gesearched in de flash help.
Kan ik dus daarmee een tijdelijke popup in bouwen met wat hij aan het doen is?
Met een trace commando kan je, als je in de Flash IDE test, variabelen in het output venster gooien.
oh,when? schreef op 27 mei 2003 @ 15:22:
een POST in flash is geen POST maar een Hybride oplossing tussen een GET en een POST. ws verwacht het Perl script een echte POST. Vandaar
Ow? Hoe kan dat dan, hybride?

Wij onderbreken deze thread voor reclame:
http://kalders.be


  • oh,when?
  • Registratie: April 2000
  • Niet online

oh,when?

...

GrimaceODespair schreef op 27 May 2003 @ 15:30:
Ow? Hoe kan dat dan, hybride?
Subject: POST methods in Flash - quirks
From: "Owen van Dijk" <owen.van.dijk@tros.nl>
Date: Tue, 27 Nov 2001 19:40:02 +0100


--------------------------------------------------------------------------------

For the past 2 hours i've been banging my head against the wall because of
the following:
When you have a Flash form, and use any of the following:

loadVariables, getURL with the POST method, it actually fakes a POST
request. It will send a GET request, and attaches the form data as
name/value pairs in the body.

So let's say you wrote a simple php file, and explicitly checks for POST
data, the vars are always NULL or empty.
example:

<?php

$postfoo = $HTTP_POST_VARS["foo"];
$getfoo = $HTTP_GET_VARS["foo"];

echo "the value of postfoo = " . $postfoo . " and the value of getfoo = " .
$getfoo;

?>

Then call this script from within your Flash environment:
loadVariables ("foo.php", "", "GET");

or

loadVariables ("foo.php", "", "POST");

It will send the following request ( found out by watching the raw data from
the request ):

GET /www/public_html/foo.php HTTP/1.1
Content-Type:application/x-www-form-urlencoded
Content-Length: 18
User-Agent: ShockwaveFlash
Host:www.example.com:80
Cache-Control: no-cache
foo=could+be+any+value&bar=more+data+to+follow

Notice the first line, that says GET? It fakes a POST request by adding the
name / value pairs in the body request (like a normal POST method)

I have yet to find a workaround, but at least i know where the problem is.
Took me awhile to find out. Sorry if this was posted before, but i couldn't
find anything in the archives.

HTH

Owen van Dijk
Web Developer - TROS

"You're only as good, as what you did last week."


  • GrimaceODespair
  • Registratie: December 2002
  • Laatst online: 10:32

GrimaceODespair

eens een tettenman, altijd ...

oh,when? schreef op 27 mei 2003 @ 15:52:
It will send a GET request, and attaches the form data as
name/value pairs in the body.
Interessant, of misschien is "kut" een beter woord. Voor welke Flash was dit, en is dit (ook nog) zo in MX?

Wij onderbreken deze thread voor reclame:
http://kalders.be


Verwijderd

Topicstarter
ik noem het kut want ik krijg mijn form niet werkend!
Pagina: 1