How to get value from custom backend menu

So, i have to put this [code] [youtube https://www.youtube.com/watch?v=qMSxYtrZS-c&w=560&h=315] [/code] [code]
in this line i have to put that iframe
[/code] then save it, then it shows in front end, to do that, i made custom backend menu in functions.php that show simple form, and it's done: [code] <form name="kotak" id="lebar" action="" method="get"> Put the video URL here<br> <input id="subject" style="width: 800px;"type="text" name="firstname" value=""><br> <input type="submit" value="Submit"> </form> [/code] now i have to get the value from the form, then shows in that line 305, then save it, then it success, im using this code to call that value in different file and folders, i know there is something missing, and surely not working. [code] <?php echo $_GET['subject']; ?> [/code] Please tell me what to do to get it success, im trying to write my custom function, not using any plugin. best regards.
M
Mohi UddinProfessorAsked on August 11, 2017 in WordPress.
|

1 Answer

you must put name of input in your $_GET[]. [code] <?php echo $_GET['firstname']; ?> [/code] and also i think you must try $_POST[] [code] <?php echo $_POST['firstname']; ?> [/code]
G
Graham W. VanceSupporterAnswered on August 11, 2017,
|

Your Answer

Write your response