Hari Hari - 4 months ago 4
PHP Question

Fetch the data of a variable from a URL into a form action

I am trying to write a code were i need to fetch the data inside a variable from a URL into a form "action" but the variable data in form action's URL IS not visible and henceforth not able to move on,this is the little amount of code i can present, please help me on this issue, pardon me i went wrong somewhere.




echo '<form id="form" name ="form" method = "POST" action="move_ppl.php?g_id = "' . $_GET['g_name'] . '" class="wizard-big" autocomplete = "off" enctype="multipart/form-data">';


In your action attribute change value to

action="move_ppl.php?g_id ='. $_GET['g_name'] . '"

Remove " quote after ?g_id