Tag Archives: button

How to insert multiple radio button values with PHP OOP

Questions: I’m working on a CMS with PHP OOP. In this project, there is a feature for users to add new Telegram Channel. For this feature, I added this form which also contains the action codes: <?php if(isset($_POST[‘submit’])){ $token = $_POST[‘token’]; $cat = $_POST[‘cat’]; $ads = $_POST[‘ads’]; $key = $_POST[‘keyboard’]; $tel = new Telegram(); $notice… Read More »

How to destroy the php session with one button

Questions: I’d like to make a simple form button which completely destroys the session when you click on it. I am just starting to use PHP for the first time, and do not see how I implement it into my HTML code. What I’d like is simply a form button which will clear the session… Read More »

One form, One submission button, but TWO actions

Questions: I have a form that collects client’s info and then it saves them in the database sends out few emails sends the info to SalesForce (SF) department Now, the first 2 two task was easy, but the third one is giving me trouble. For SF i don’t have do anything special, just have to… Read More »

how to call a php function on button click

Questions: These are two files Calling.php <html> <body> <form action=”Called.php” method=”get”> <input type=”button” name=”B1″ value=”B1″> <input type=”button” name=”B2″ value=”B2″> <input type=”Submit” name=”Submit1″/> <!– <a href=”http://www.google.com?act=google”>Google</a> <a href=”http://www.yahoo.com?act=yahoo”>yahoo</a> –> </form> </body> </html> And Called.php <?php if(isset($_GET(“Submit1”))) { echo(“<script>location.href = ‘http://stackoverflow.com’;</script>”); } if(isset($_GET[“B1”])) { echo(“<script>location.href = ‘http://google.com/’;</script>”); exit(); } if(isset($_GET[“B2”])) – List item { echo “<meta http-equiv=’refresh’… Read More »

Prevent resubmit form after click “back” button

Questions: I have 2 pages : page1.php : – has a form with text box and a “submit” button. Eg : <form name=”frm_register” action=”page1.php” method=”post”> – php and mysql code to store the value of textbox to database. Javascript will redirect the page to php2.php after the value is submitted to database. Eg : $query… Read More »