Hi all,

I'm new in the php world and I have a problem. I want to invoke a php script 
from a web page hosted on an Apache server. The php script writes and deletes a 
file but, to be able to do that, I have to make the user to be myself and not 
the Apache server. In order to do that below is the code
I use in the html to invoke the php script:

<form action="http://www.aa.dd.cc/cgi-bin/cgiwrap/user/script.php"; 
method="post">
value1 *: <input type="text" name="val1"><br>
value2 *: <input type="text" name ="val2"><br>
</form>

where script.php is placed inside ~/user/public_html/cgi-bin

The problem is that when the script is launched, as soon as the html in 
visited, I get this error:

PHP Notice: Undefined index: val1 in 
/net/people/user/public_html/cgi-bin/script.php on line 14
PHP Notice: Undefined index: val2 in 
/net/people/user/public_html/cgi-bin/script.php on line 16

In other words, the POST issued inside the html seems not to work because the 
values val1 and val2 are not found.

If instead I do the following in the html code:

<form action="script.php" method="post">
value1 *: <input type="text" name="val1"><br>
value2 *: <input type="text" name="val2"><br>
</form>

having placed script.php in the same directory where the html is, the POST 
succeeds but of course the script is not able to delete the file it is supposed 
to work on because the owner becomes the apache server.

I need the first method (script.php inside cgi-bin) to work.
Does anybody know the way to solve the problem?
Any help will be appreciated,
thanks,
-emiliano



------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada16dic06


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

Reply via email to