good work bro
Posts made by ciaompe
-
RE: php form එකක තියෙන variable එකක් තව multiple pages වලට යවන්නේ(පෙන්නන්නේ) කොහොමද php වලින්.
Sample html form
<form action="form.php" method="POST"> <div class="form-group"> <input type="text" name="name" id="name" class="form-control" placeholder="Name"> </div> <div class="form-group"> <input type="email" name="email" id="email" class="form-control" placeholder="Email"> </div> <button class="btn btn-primary" type="submit">Submit</button> </form>
Add this on to your website footer
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
The back end part
<?php $form_data = array(); $form_data['name'] = $_POST['name']; $form_data['email'] = $_POST['email']; echo json_encode($form_data); ?>
This is the form submit through javascript with query ajax part
<script> $(document).ready(function() { $('form').submit(function(e) { e.preventDefault(); var values = $(this).serialize(); $.ajax({ url: "form.php", type: "post", data: values , success: function (res) { alert('Form submitted successfully...') console.log(res) }, error: function(xhr, status, error) { console.log(xhr.responseText); } }); //send second form request $.ajax({ url: "form2.php", type: "post", data: values , success: function (res) { alert('Form submitted successfully...') console.log(res) }, error: function(xhr, status, error) { console.log(xhr.responseText); } }); }) }); </script>
-
RE: C Programming මුල සිට ඉගෙනගනිමු (part 4 - Input & Output functions)
@Kalana-Eranda-Jayasuriya
podi app ekak kiuwe, data input karala manipulate karana podi programe ekak
-
RE: C Programming මුල සිට ඉගෙනගනිමු (part 4 - Input & Output functions)
Superb bro, මේ කරපු ඒවා ටික use කරලා පොඩි application එකක් හදන්න පුලුවන්නම් ගොඩක් හොදයි
-
RE: Android සිංහලෙන් Video Series
niyamai bro digatama karagena yanna.
-
RE: Deploy Angular on Firebase Hosting for FREE!
can you add article contents to this forum thread ?
-
RE: C++ to txt file update
me thiyenne .txt eken use karana widiya.
#include <iostream> #include <fstream> #include <conio.h> #include <string> using namespace std; class User { public: string username; string password; void userRegister() { ofstream usersFile ("userData.txt"); if ( !usersFile.is_open()) { usersFile.open("userData.txt"); } usersFile << username << " " << password << endl; usersFile.close(); } }; int main() { User user1; cout << "Welcome!\n-------------------------------\n\nPlease register.\nEnter a new username:\n"; cin >> user1.username; cout << "\nPlease enter a new password:\n"; cin >> user1.password; user1.userRegister(); getch(); }
-
RE: C++ to txt file update
.txt use karanna epa .dat use karnana oyata lesiyen karnana puluwan oya wade.
-
RE: Hacking websites with SQL Injection 💉
Awesome, we want this kind of articles. Thanks
-
RE: Need Sinhala devs for react.js
Nice Work bro. welcome to the developer community in Sri Lanka
-
RE: Lanka Developers Community T-shirts
Where did your ordered the t-shirt ? What is your email address,
-
Lanka Developers Community T-shirts
We gonna release Lanka Developers t-Shirts to 10 winners as we committed in our promotional period and now you can reserve your one.
-
RE: Lanka Developers Meetup
Good idea. we can do this. we want your contribution Thanks