RE: How to get value from custom backend menu

So, i have to put this


[youtube https://www.youtube.com/watch?v=qMSxYtrZS-c&w=560&h=315]

in this line i have to put that iframe

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:


<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>

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.


<?php echo $_GET['subject']; ?>

Please tell me what to do to get it success, im trying to write my custom function, not using any plugin. best regards.

Mohi Uddin Brong Asked on August 11, 2017 in WordPress.
Add Comment
1 Answers

you must put name of input in your $_GET[].


<?php echo $_GET['firstname']; ?>

and also i think you must try $_POST[]


<?php echo $_POST['firstname']; ?>

Brong Answered on August 11, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.