Alert input name in PHP

krizasoft

New Member
I got a button which, when clicked, opens a new window (alert) with input text.Now the input text has a name, let's say \[code\]name="test"\[/code\], but I'm having problems getting that name from JS to PHP. Can I do that?Here is the code:\[code\]if (isset($_POST['edit'])){ $editfile = $_POST['member']; $alertname = $_GET['test']; rename('social/'.$editfile.'.xml', 'social/'.$alertname.'.xml');}\[/code\]JS:\[code\]<input type="submit" name="edit" onclick="prompt('Please type new member name:', 'Member new name');" value="http://stackoverflow.com/questions/14056558/Edit" />\[/code\]
 
Back
Top