Search the Community
Showing results for tags 'buttons'.
-
When I click the button "baru", it sends me to the page create_pertandingan.php, however, when I click the button "lama", nothing happens. I'm clearing the post array so the user can give another input after reloading. <?php session_start(); include("sambungan.php"); if ($_POST) { if (isset($_POST["baru"])) { $_POST = array(); header("Location:./create_pertandingan.php"); } if (isset($POST["lama"])) { $_POST = array(); header("Location:./main.php"); } } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <link href="styles.css" rel="stylesheet"> <title>SPPC</title> </head> <body> <div> <form action="load_pertandingan.php" method="post"> <p>Load Pertandingan:</p> <input type="submit" name="baru" value="Baru"> <input type="submit" name="lama" value="Lama"> </form> </div> </body> </html>
-
This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated I am trying to do a Web form that is taking an online order form! This is What I have so far: This is the input page or html page: <form method="POST" action="OnlineOrders.php"> <table border=0> <tr> <td width=260>NameE<br /></td> <td width=295>Descripation<br /></td> <td width=45>Price<br /></td> <td width=35>Quanity<br /></td> </tr> <tr> <td>Shirts</td> <td>Red</td> <td align="right">$11.50</td> <td align="center"><input type="text" name="shirt" size="3" maxlength="3" /></td> </tr> <tr> <td>Pants</td> <td>blue</td> <td align="right">$23.99</td> <td align="center"><input type="text" name="pants" size="3" maxlength="3" /></td> </tr> <tr> <td>Shoes</td> <td>Tennis Show</td> <td align="right">$35.25</td> <td align="center"><input type="text" name="shoes" size="3" maxlength="3" /></td> </tr> <tr> <tr> <td>Coat</td> <td>Winter coat</td> <td align="right">$47.50</td> <td align="center"><input type="text" name="coat" size="3" maxlength="3" /></td> </tr> <tr> <td>Socks</td> <td>Yellow</td> <td align="right">$4.99</td> <td align="center"><input type="text" name="socks" size="3" maxlength="3" /></td> </tr> <tr> <td>Hats</td> <td>Baseball Cap</td> <td align="right">$8.99</td> <td align="center"><input type="text" name="hats" size="3" maxlength="3" /></td> </tr> </tr> </table> </form> <br /> <input name="submit" type="submit" value="Submit Order" /> <input type="reset" name="reset" value="Recalculate Order" /> <hr /> <p> <a href="OrderBoard.php">View Order</a> </p> </body> </html> ******************** The problem is I don't know what to do with the processing page for me to do the rest: I am taking about OnlineOrders.php that i have at the beginning of the program: <form method="POST" action="OnlineOrders.php"> How do i start the Processing page of the program! Can Someone show me how do I start and I could do the rest! Thank You!
- 1 reply
-
- manipulating arrays
- web form
-
(and 1 more)
Tagged with:
-
Hi. I'm going to create a web-based system in php. I wanna put 8 categorys, one on each row and behind each of them there will be 9 buttons.- to the right there vill be a 8x9 cells table. When i press one button the value of that buttons variable will increase with 1. After pressing the button im still at the same page still seeing all those buttons behind the categories. But the value to the button i just pressed will be shown in the table to the right. I may press several buttons a hundred times and the table still show the value (value = how many time i press each button). Can anyone help me on my way? I did work a lot with php for about 10 years ago, but i cant figure out how this could be done..
- 2 replies
-
- evaluation
- system
-
(and 3 more)
Tagged with:
-
<!DOCTYPE html> <html> <head> <style type="text/css"> div#video_player_box{ width:550px; background:#000; margin:0px auto;} div#video_controls_bar{ background: #333; padding:10px; color:#CCC; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; } button#playpausebtn{ background:url(pause.png); border:none; width:16px; height:18px; cursor:pointer; opacity:0.5; } button#playpausebtn:hover{ opacity:1; } input#seekslider{ width:180px; } input#volumeslider{ width: 80px;} input[type='range'] { -webkit-appearance: none !important; background: #000; border:#666 1px solid; height:4px; } input[type='range']::-webkit-slider-thumb { -webkit-appearance: none !important; background: #FFF; height:15px; width:15px; border-radius:100%; cursor:pointer; } </style> <script> var vid, playbtn, seekslider, curtimetext, durtimetext, mutebtn, volumeslider, fullscreenbtn; function intializePlayer(){ // Set object references vid = document.getElementById("my_video"); playbtn = document.getElementById("playpausebtn"); seekslider = document.getElementById("seekslider"); curtimetext = document.getElementById("curtimetext"); durtimetext = document.getElementById("durtimetext"); mutebtn = document.getElementById("mutebtn"); volumeslider = document.getElementById("volumeslider"); fullscreenbtn = document.getElementById("fullscreenbtn"); // Add event listeners playbtn.addEventListener("click",playPause,false); seekslider.addEventListener("change",vidSeek,false); vid.addEventListener("timeupdate",seektimeupdate,false); mutebtn.addEventListener("click",vidmute,false); volumeslider.addEventListener("change",setvolume,false); fullscreenbtn.addEventListener("click",toggleFullScreen,false); } window.onload = intializePlayer; function playPause(){ if(vid.paused){ vid.play(); playbtn.style.background = "url(pause.png)"; vid.play(); playbtn.innerHTML = "pause"; } else { vid.pause(); playbtn.style.background = "url(play.png)"; vid.play(); playbtn.innerHTML = "play"; } } function vidSeek(){ var seekto = vid.duration * (seekslider.value / 100); vid.currentTime = seekto; } function seektimeupdate(){ var nt = vid.currentTime * (100 / vid.duration); seekslider.value = nt; var curmins = Math.floor(vid.currentTime / 60); var cursecs = Math.floor(vid.currentTime - curmins * 60); var durmins = Math.floor(vid.duration / 60); var dursecs = Math.floor(vid.duration - durmins * 60); if(cursecs < 10){ cursecs = "0"+cursecs; } if(dursecs < 10){ dursecs = "0"+dursecs; } if(curmins < 10){ curmins = "0"+curmins; } if(durmins < 10){ durmins = "0"+durmins; } curtimetext.innerHTML = curmins+":"+cursecs; durtimetext.innerHTML = durmins+":"+dursecs; } function vidmute(){ if(vid.muted){ vid.muted = false; mutebtn.innerHTML = "Mute"; } else { vid.muted = true; mutebtn.innerHTML = "Unmute"; } } function setvolume() { vid.volume = volumeslider.value / 100; } function toggleFullScreen(){ if(vid.requestFullScreen){ vid.requestFullScreen(); } else if(vid.webkitRequestFullScreen){ vid.webkitRequestFullScreen(); } else if(vid.mozRequestFullScreen){ vid.mozRequestFullScreen(); } } </script> </head> <body> <div id="video_player_box"> <video id="my_video" width="550" height="310" autoplay> <source src="Tom_and_Jerry.mp4"> </video> <div id="video_controls_bar"> <button id="playpausebtn"></button> <input id="seekslider" type="range" min="0" max="100" value="0" step="1"> <span id="curtimetext">00:00</span> / <span id="drtimetext">00:00</span> <button id="mutebtn">Mute</button> <input id="volumeslider" type="range" min="0" max="100" value="100" step="1"> <button id="fullscreenbtn">[ ]</button> </div> </div> </body> </html> i cant seem to get the play/pause button to show when the play.png and pause.png buttons arent available. also do you know where i can get free icons of play and pause button ?
- 5 replies
-
- video
- videoplayer
-
(and 2 more)
Tagged with:
-
I have been trying to look up how to make a div that has a side scroll ability but with out the the ugly normal overflow:scroll attribute. I have seen it used plenty of times but its like nobody knows what i am talking about. Just a div that would inside or on either sides have a right, left ability to scroll. Could anyone help me out? I'm not even sure what language would support this kind of thing. I'm thinking jQuery but could find anything on the subject. Any help would be so appreciated.
-
Hey fellas, I recently decided to start my personal database on monsters in a game and have a website with forms etc where I can enter new monsters. Now I've made a start, but I'm getting a line 15 error when trying to execute the form without having an input button ticket. The file including the form that's related to the error (newmonster.php): </tr><tr> <td>Attribute:</td> <td><input type="radio" name="attribute" value="dark" />Dark <input type="radio" name="attribute" value="earth" />Earth <input type="radio" name="attribute" value="fire" />Fire <input type="radio" name="attribute" value="light" />Light <input type="radio" name="attribute" value="water" />Water <input type="radio" name="attribute" value="wind" />Wind</td> And this is the part of the file it's submitting the form to: Line 15 is the line between $type and $attack. The one with $attribute declaration. function invoer_schoonmaken($tekst) { $tekst = strip_tags($tekst); $tekst = htmlspecialchars($tekst); return $tekst; } $naam = invoer_schoonmaken($_POST["naam"]); $type = invoer_schoonmaken($_POST["type"]); $attribute = invoer_schoonmaken($_POST["attribute"]); $attack = invoer_schoonmaken($_POST["attack"]); $defense = invoer_schoonmaken($_POST["defense"]); $stars = invoer_schoonmaken($_POST["stars"]); $description = invoer_schoonmaken($_POST["description"]); $booster = invoer_schoonmaken($_POST["booster"]); The error is gives: So basically, what have I done wrong with the coding here? I'm not skilled in php in any way so I'm just trying to brush it up a bit with some MySQL later, so any constructive help would be greatly appreciated.
-
When I press any buttons to delete, add or subtracts (etc) things on my website, it always go to the top, like if it's refreshing the site. Any idea how I can avoid this ? Is it possible overall?
-
How do I save or what is the syntax to save a button in a cookie? test site test I did try a header like <h3>Hello</h3> but get error with a boot5 button. <code> <?php $mp = "vids/coli.mp4"; $dall ="aaa";// echo "dall=".$dall; $uep = `<button type="button" class="btn btn-warning" onmouseover="show(0)" onmouseout="hide(0)" onclick="skip(-5000) ">0:0:0</button>`; //echo "uep=".$uep; setcookie('mp'.'$mp'.time()+30*24*60*60.); setcookie('dall'.'$dall'.time()+30*24*60*60.); setcookie('uep'.'$uep'.time()+30*24*60*60.); ?> </code> ?