zift88 Posted January 20, 2007 Share Posted January 20, 2007 Hello, My name is kevin, i'm building a video website and I'm having some problams. I have 10 buttons all leading to a different player (All in HTML), I want them all to go into one playerinstead.I want to be able to go to the same player from each button rather than starting a new HTML page for each one.Is there anyway to do this with PHP?Maybe with ID's or something I really don't know, I have no experience what so ever with PHP based websites.Please help,Kevin Link to comment https://forums.phpfreaks.com/topic/34968-html-leading-to-php-page-help/ Share on other sites More sharing options...
PC Nerd Posted January 20, 2007 Share Posted January 20, 2007 if what you discribed is getting the user to choose a player through radio buttons, and then getting the page to change acording to this without reloading..... there is no way to do it with php.you could do javascriptuse the DOM and do something like the onClick(FUNCTION - HERE);the function would then be what is displayed ( like html displayed dynamically & selectively )in php the page would have to reload. if you definately wanted to use php, then you would either have to have a submit ( or "SELECT PLAYER ") button, and have that loop back to the same page, but with PHP in the header validating the radio buttons, and echoing the html for the appropriate selectioneg if ($_POST['radio1'] == "TRUE") {echo the option 1 player HERE }if ($_POST['radio2'] == "TRUE") {echo the option 2 player HERE}........else {the normal radio button options here, as the defult is nothing is selected } ### this would alwzays be the case first time aroundhope that helpsPC NErd Link to comment https://forums.phpfreaks.com/topic/34968-html-leading-to-php-page-help/#findComment-164956 Share on other sites More sharing options...
zift88 Posted January 20, 2007 Author Share Posted January 20, 2007 [quote author=PC Nerd link=topic=123231.msg509114#msg509114 date=1169292199]if what you discribed is getting the user to choose a player through radio buttons, and then getting the page to change acording to this without reloading..... there is no way to do it with php.you could do javascriptuse the DOM and do something like the onClick(FUNCTION - HERE);the function would then be what is displayed ( like html displayed dynamically & selectively )in php the page would have to reload. if you definately wanted to use php, then you would either have to have a submit ( or "SELECT PLAYER ") button, and have that loop back to the same page, but with PHP in the header validating the radio buttons, and echoing the html for the appropriate selectioneg if ($_POST['radio1'] == "TRUE") {echo the option 1 player HERE }if ($_POST['radio2'] == "TRUE") {echo the option 2 player HERE}........else {the normal radio button options here, as the defult is nothing is selected } ### this would alwzays be the case first time aroundhope that helpsPC NErd[/quote]hmm actually I do want the page to reloadbasically what I search for is the option to have a variable, so that each button the user clicks, the variable changes to a different number, which will be put in the player's scrip (it's a script I took from this video site, somethinglike YouTube).So that actually I DO want it in a new page, not the same one..I can give an example if that can help.. Link to comment https://forums.phpfreaks.com/topic/34968-html-leading-to-php-page-help/#findComment-164982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.