Passing a GET value from HTML form to Twitter API 1.1 PHP

前端 未结 1 1271
别跟我提以往
别跟我提以往 2021-01-25 05:51

I\'m only new and learning so thanks for any advice you can give :) I\'m making a really simple tool to retrieve specific data from a Twitter API 1.1 GET request for a school pr

相关标签:
1条回答
  • 2021-01-25 06:36

    If $getfield = '?screen_name=TWITTER_SCREEN_NAME'; works without form data, then you should just need to change the line

    $getfield = $_GET['screen_name'];
    

    to

    $getfield = "?screen_name=".$_GET['screen_name'];
    

    Assuming you're only passing through the @handle through in the form

    Also, (this is not pertinent to your issue) the line if(!empty($_GET ['screen_na... shouldn't have a space inbetween the $_GET and the [.

    0 讨论(0)
提交回复
热议问题