How to Execute a PHP Function on Button Click

How to Execute a PHP Function on Button Click

eInstructor

3 года назад

78,173 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bosnian Developer
Bosnian Developer - 04.05.2023 02:24

Simple and effective , thank you bro !!!!

Ответить
Michael Sebsbe
Michael Sebsbe - 13.10.2022 18:52

Thank you Bro

Ответить
Aziah M
Aziah M - 09.10.2022 08:00

Legend bro!

Ответить
Salman Razak
Salman Razak - 23.08.2022 13:17

you saved my life bro

Ответить
Jorge D
Jorge D - 28.03.2022 00:24

AMEN thanks

Ответить
Hafuketo
Hafuketo - 08.02.2022 22:23

This video shows you how to use an if statement. Not a function. Not usable with OOP PHP.

Ответить
Refat Fahmi
Refat Fahmi - 11.01.2022 14:22

Hi can you tell our how make button for delete row in mysql please

Ответить
Jamal AMRINS
Jamal AMRINS - 28.12.2021 20:28

just a tip its not a description, a comments tatw93 and your videos are good and keep going forward .....

Ответить
Leonard De Lanerole
Leonard De Lanerole - 13.10.2021 12:20

this is my code. It doesn't work . same like your . my database table wp_books




<?php

/*
Template Name: Book Registration Form
*/

get_header();

?>

<div class="container page-section">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main"

<?php

if (isset($_POST['submitbtn']))
{

echo "<script>alert('entered function');</script>";

global $wpdb;

$wpdb->insert($wpdb->prefix.books,
[
'title' => 'This is first insert'
]
);

if ($result==1){
echo "<script>alert('Book Saved');</script>";
}else{
echo "<script>alert('Unable to Save');</script>";
}

echo $wpdb->show_errors();

}


?>




<form method="post">
<div class="form-group">
<input id="title" name"title" type="text" placeholder="Book Title" class="form-control">
</div>
<div class="row justify-content-center">
<div class="col-xs-4 col-sm-4 col-md-4">
<input type="submit" value="Submit" name="submitbtn">
</div>
</div>
</form>
</main>
</div>
</div>

Ответить
יוחאי גליק
יוחאי גליק - 17.09.2021 19:30

Are you using a Wordpress engine? Where is the Wordpress panel and where does that code fit?

Ответить
am仙人
am仙人 - 06.09.2021 11:50

hey! if just call a function?
like u video do?

here's my problem:

<?php
if(isset($_POST['ab1']))
{
echo "<script type='text/javascript'>";
echo "console.log('yes');";
echo "</script>";
sendready("0",$myid);
}
?>
<form method="post">
<input type="submit" class="mainbut" name="ab1" id="ab1" value="learn"></input>
</form>

i want to click this and show me the console and something else,but nothing happen
not console or error
how fix it? or i wrong to use?

Ответить
RWG art
RWG art - 30.08.2021 05:39

How Can I call that with parameters? Thanks

Ответить
anna beatriz
anna beatriz - 30.03.2021 18:27

"im sick of this hello world" lmaoooo.. great video btw!!

Ответить