Re: [PHP] Script Execution via URL

2002-09-01 Thread Justin French

This would work if the script you wished to call was default.php / index.php
/ etc etc...

what I mean to say is site.com/index.php?var=foo is the same as
site.com/?var=foo, as long as your server works that way.

leaving out PHP_SELF will give different results if the script you wish to
call ISN'T the default for that directory.


PHP forms are just HTML forms.  That is to say that once the code gets to
the browser, it's just HTML code.  So once the code is at the browser, it
works just like any other page, where a user (or a javascript program) has
to submit the form.


justin



on 01/09/02 12:08 AM, Sascha Braun ([EMAIL PROTECTED]) wrote:

 Hi everybody,
 
 i wrote a script which will be executed by HREF's. If a command is going to be
 executed by a click on a link the page reloads itself and jumps
 in the part of the script, which should be executed.
 
 Normaly I wrote some like this for doing this:
 
 echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].'
 class=text01';
 
 but now in a very special case i forgot to write $PHP_SELF like this
 
 a href=?action=deleteid='.$arrResult['id'].' class=text01
 
 without knowing that I have forgotten to write this $PHP_SELF thing I clicked
 on the Link and i did execute the Script, like i wanted it to.
 
 Is it normal that it works so fine? Can I use this everytime I link on the
 same page for script execusion?
 
 Can I send Forms via an PHP Function like the submit() statement in
 Javascript?
 
 Have a nice day, and please answer.
 
 Sascha Braun
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Script Execution via URL

2002-08-31 Thread Sascha Braun

Hi everybody,

i wrote a script which will be executed by HREF's. If a command is going to be 
executed by a click on a link the page reloads itself and jumps
in the part of the script, which should be executed.

Normaly I wrote some like this for doing this:

echo 'a href='.$PHP_SELF.'?action=deleteid='.$arrResult['id'].' class=text01';

but now in a very special case i forgot to write $PHP_SELF like this

a href=?action=deleteid='.$arrResult['id'].' class=text01

without knowing that I have forgotten to write this $PHP_SELF thing I clicked on the 
Link and i did execute the Script, like i wanted it to.

Is it normal that it works so fine? Can I use this everytime I link on the same page 
for script execusion?

Can I send Forms via an PHP Function like the submit() statement in Javascript?

Have a nice day, and please answer.

Sascha Braun