+ 1
how to make a user input variable in php?
I'm new to coding overall, how do I make a html form that can fill in a variable in php? I already have part of the variable, I got this: $url = "https://gateway.apiportal.ns.nl/reisinformatie-api/api/v2/arrivals?station=RTA"; But I need to be able to change the "RTA" at the end. can anyone please help me with this?
3 Respuestas
+ 1
Try this..
<Form action="#" method="post">
<Input type="text" value="" name="user"/>
</Form>
<?php
$user=$_POST['user'];
?>
0
In addition to my former post...
PHP uses the name attribute to select html inputs
0
thanks for your help! i figured it out thanks to this.