How to use raw input in php? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to use raw input in php?

A raw input means input from the user end.

7th May 2018, 5:15 PM
Manish Tiwari
Manish Tiwari - avatar
8 Answers
+ 9
<?php $x; if(isset($_POST["value"])) { $x = $_POST["value"]; } echo "<form action='' method='post'><input name='value'></form>"; ?>
8th May 2018, 9:43 PM
Toni Isotalo
Toni Isotalo - avatar
+ 4
Not possible
7th May 2018, 6:48 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
mean like post and get via html form or something without reloading like ajax
7th May 2018, 5:51 PM
Lexfuturorum
Lexfuturorum - avatar
+ 1
only using php
7th May 2018, 5:53 PM
Manish Tiwari
Manish Tiwari - avatar
+ 1
for a website? i need more context
7th May 2018, 5:54 PM
Lexfuturorum
Lexfuturorum - avatar
+ 1
A raw input from the user end using php script only. <?php $x = raw input from user end. //Using this value for your defined function. myfunc () ?>
7th May 2018, 6:01 PM
Manish Tiwari
Manish Tiwari - avatar
+ 1
You can't get raw user input. You need HTML. The browser doesn't understand PHP.
7th May 2018, 9:08 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
i think the get form is possible in sololearn
7th May 2018, 6:49 PM
Lexfuturorum
Lexfuturorum - avatar