shubham704 Posted May 4, 2020 Share Posted May 4, 2020 So I wants to take value from URL, I create simple PHP code for taking value from URL <?php if(isset($_POST["Search"])){ $url = $_POST["url"]; $value = (explode ('v=', $url)); $videoId = $value[1]; } ?> This for taking value from this https://www.youtube.com/watch?v=value url and echo somewhere, but wants to take value from https://www.youtu.be/value , this also, but how? , work with both URLs Link to comment Share on other sites More sharing options...
Ingolme Posted May 4, 2020 Share Posted May 4, 2020 It will take a bit of time to learn, but this is a job well suited for regular expressions: https://www.php.net/preg_match http://www.regular-expressions.info/ Link to comment Share on other sites More sharing options...
Makwana Prahlad Posted July 16, 2020 Share Posted July 16, 2020 Use the ampersand & to glue variables together: $url = "http://localhost/main.php?email=$email_address&event_id=$event_id"; // ^ start of vars ^next var Link to comment Share on other sites More sharing options...
Ingolme Posted July 16, 2020 Share Posted July 16, 2020 9 hours ago, Makwana Prahlad said: Use the ampersand & to glue variables together: $url = "http://localhost/main.php?email=$email_address&event_id=$event_id"; // ^ start of vars ^next var I am not sure you even read the question. You consistently provide incorrect or irrelevant answers to questions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now