Verify textbox value HTML/PHP
2015-01-01, 03:11 AM,
#1
Hey
I'm a beginner in the php/html and I didn't find a solution for my problem until now
I have a textbox and I want, when somebody press a button, to verify the text from that box and if is the same like the one that I set a msg box to appear "your text is valid" else "error"

In VB is simple
Quote:Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = "and" Then
MsgBox("da")
Else
MsgBox("nu")
End If
End Sub


How to transform this in HTML/PHP?
2015-01-01, 04:25 AM,
#2
It can be done with JavaScript, code is

Code:
$('.check').click(function() {
    var active_code = $('#activate-code').val();
    if (active_code == '12A45F'){
    alert("success");
    }else{
    alert("error");}
    });

"activate-code" is ID for input field.
"check" is ID for button.
Latest Thanks - View all

GraveYard(2015-01-01 03:56 PM) 
2015-01-01, 03:56 PM,
#3
Thank you very much, I solved the problem.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Clash of Clans HTML template - HQ template M!st3r XX 20 6,929 2017-09-25, 05:32 AM
Last Post: potter1594
  Help Needed CPAgrip php script takumi 4 843 2017-01-24, 04:47 AM
Last Post: takumi
  [REQUEST] Comment box with moderation HTML code iamrichsoon 1 759 2016-12-25, 05:51 AM
Last Post: CegaFin
  SOME DATA IS NOT BEING INSERTED TO MYSQL DATABASE WITH PHP QwertySon 2 1,167 2016-11-21, 02:52 PM
Last Post: QwertySon
  Cpagrip Url Locker Html Code ashu55 5 2,235 2016-10-30, 07:42 PM
Last Post: baxxx





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top