How to create submit button click in php $_GET OR $_POST?
Learn with riwash
Article by technical riwash
In this article i am going to teach you How to create submit button click in php $_GET OR $_POST
When some user fills out the above empty box and try to click in submit button
the data which are user fills was processing to a php file name myhome.php
Here is php example of how to $_GET, $_POST are work.
This is a method post in html .
<html>
<body>
<form class="myfrom" action"<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
<input type="text"
name="sharetext"
placeholder="droup your link here" required/> </td> <br>
<input type="submit" name="share"value="share"/> <br>
</from>
</body>
In above this are then simply html form that use for input value now here we use php script
if(isset($_POST['share']))
{
header(location:'myhome.php');
?>
here if is a function and inside if we use variable share.
why share ?
in html code we write name="sharetext", so name deffine variable in php.
your variable is share.
we use $_POST method.
When user click in variable share (option of send ) then our page process to then page of
myhome.php.
So these is a way of how we can How to create submit button click in php $_GET OR $_POST.
my name is riwash chamlagain if you want to contact me then send mail in technicalriwash@gmail.com

No comments:
Post a Comment