Q: Using a HTML Form to feed a eval() command ?

From: Date: Mon, 21 Jun 2004 22:00:15 +0000
Subject: Q: Using a HTML Form to feed a eval() command ?
Groups: php.doc.ro 
Request: Send a blank email to doc-ro+get-97@lists.php.net to get a copy of this message
I am trying to write a piece of code that can allow me to feed php commands directly into the server using a html form, but i am not getting anywhere... anyone know another way besides the eval() command... this is what i tried: <?php passthru($HTTP_POST_VARS['username']); ?> but as you can see this enables me to feed shell commands (not php). and this: <?php $cmd = "run $HTTP_POST_VARS['username']" if ($cmd == "run") { echo "Success"; } ?> but i seem to lack the skill of seeing the error i have made... can anyone help? <?php eval($HTTP_POST_VARS['username']) ?> and this! this was the best i could do, but it would only work if i fed the command directly between the ()... like i wrote it it dies!

« previous php.doc.ro (#97) next »