Carlton Posted August 17, 2010 Share Posted August 17, 2010 echo(" <form method = \"get\" action = \"DeleteApp.php?pname=\" . $Applications['Name'] . \"> <input value='Delete' type='submit' /> </form> "); Why is this redirecting to: DeleteApp.php?. Instead of what you can obviously see what it's supposed to redirect to. Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/ Share on other sites More sharing options...
MadTechie Posted August 17, 2010 Share Posted August 17, 2010 I can "obviously see" it posting to "DeleteApp.php" what was you expecting ? also you probably meant why is the pname not being set! try this (with extra quotes) echo(" <form method = \"get\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\"> <input value='Delete' type='submit' /> </form> "); Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100562 Share on other sites More sharing options...
Pikachu2000 Posted August 17, 2010 Share Posted August 17, 2010 Huh? It looks like it's supposed to go to DeleteApp.php to me . . . Or do you mean it isn't appending the GET vars to the URL string? Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100563 Share on other sites More sharing options...
Carlton Posted August 17, 2010 Author Share Posted August 17, 2010 Quote I can "obviously see" it posting to "DeleteApp.php" what was you expecting ? also you probably meant why is the pname not being set! try this (with extra quotes) echo(" <form method = \"get\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\"> <input value='Delete' type='submit' /> </form> "); No I didn't mean, that pname is a empty string (In the URL of course). The page just goes to http://localhost/DeleteApp.php? Nothing after .php? Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100565 Share on other sites More sharing options...
Pikachu2000 Posted August 18, 2010 Share Posted August 18, 2010 That isn't the way to send a GET var . . . <?php echo "<form method=\"get\" action=\"DeleteApp.php\"> <input type=\"hidden\" name=\"pname\" value=\"{$Applications['Name']}\" /> <input value='Delete' type='submit' /> </form> "; ?> Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100567 Share on other sites More sharing options...
MadTechie Posted August 18, 2010 Share Posted August 18, 2010 YEP! using get and not passing anything from the form will give a clear url! if you used POST the you could pass both! IE echo(" <form method = \"POST\" action = \"DeleteApp.php?pname=\"" . $Applications['Name'] . "\"> <input value='Delete' type='submit' /> </form> "); BUT Pikachu2000 is the better route IMHO Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100568 Share on other sites More sharing options...
Carlton Posted August 18, 2010 Author Share Posted August 18, 2010 Quote That isn't the way to send a GET var . . . <?php echo "<form method=\"get\" action=\"DeleteApp.php\"> <input type=\"hidden\" name=\"pname\" value=\"{$Applications['Name']}\" /> <input value='Delete' type='submit' /> </form> "; ?> Thank you. Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100569 Share on other sites More sharing options...
MadTechie Posted August 18, 2010 Share Posted August 18, 2010 can you please mark this as solved Link to comment https://forums.phpfreaks.com/topic/211018-action-failure/#findComment-1100570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.