How can I send a variable from a text field in an html doc to a php page?
Posted on 2006-11-01
Ultimately I need to send a variable which is really a web address to a php page after a button is clicked on the html page.
The two issues I currently have are:
I'm not entirely sure how to build the html page that will send a variable that the php page would recognize. I successfully built an upload page with no problem, but this delete page, which you type in the web address that has permissions to delete a certain file seems totally unrelated.
html page so far for deleting interface:
<FORM ACTION="deleteTest.php" NAME="application">
application date: <INPUT TYPE=TEXT NAME="deletedFile" SIZE=10>
<BUTTON TYPE=RESET><FONT COLOR=RED>Reset Form</FONT></BUTTON>
<BUTTON TYPE=SUBMIT><STRONG>Send address to delete</STRONG></BUTTON>
I was guessing that the name of the variable could go under "deletedFile" but I know this is probably totally wrong.
deleteTest.php I know would probably be extremely simple:
$myFile = 'deletedFile';
Again, 'deletedFile' would be the variable of the web address that the user types in.