[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] <form action="<?php echo $PHP_SELF?>" method="POST">



Ole Kofoed Hansen wrote:
Jørgen Heesche wrote:

skip
"
og reboot er register globals slået til.


Jeg vil anbefale at slå det fra igen. Det er meget let at komme til at lave scripts med sikkerhedshuller, når det er slået til. Det er derfor, det blev slået fra som standard.

Jeg sidder med en stand-alone arbejdsstation uden remote users, endvidere afviser min firewall al trafik, undtagen den nødvendige til webspeed: port 53 og 67.
Evt. sikkerhedshuller skulle ikke betyde noget.
Jeg satte 'register globals = on', fordi det blev foreslået i et indlæg her i tråden.


skip

Browseren sender ikke en værdi tilbage, der hedder submit. Det er fordi du har en navnløs submit-knap, som ikke i sig selv sender noget. Prøv at rette den til:


<input type="submit" name="submit" value="Submit form" />

Eller du kan bare teste på et af de navngivne felter i stedet for på submit med:

if(isset($_POST['name']))


Det virker nu med: . . if ($_POST['name']) . . <input type="submit" name="submit" /> . .

Default value for submit er "Submit Query"

Jeg har før brugt php med 'PHP_SELF*, hvor "if ($submit)" virkede.
"
if ($submit)
...
<INPUT TYPE="submit" name="submit" VALUE="Hent data">
"
Men det var på et andet system, end det jeg har i dag; PHP er åbenbart ændret fra 4.2.3 til 4.3.1 .




skip

Og så lige min nysgerrighed. Hvorfor bruger du forresten XML-syntaks, når din kode mangler en hel del i at være gyldig XHTML alligevel?

Jeg kender ikke XML. Eksemplet fandt jeg her:
http://www.w3schools.com/php/php_forms.asp
Det var to selvstændige scripts: et form-script og det tilhørende action-script, som lige kunne bruges til at teste teknikken med 'PHP_SELF'.



-- Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-11-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *